31 const float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f};
32 const float one[4] = {1.0f, 1.0f, 1.0f, 1.0f};
105 float invviewmat[4][4];
114 float step_length =
max_ff(1e-16f, dim[axis] * 0.05f);
126 float dim[3], step_length, max_slice;
127 float slice_count[3] = {fds->
res[0], fds->
res[1], fds->
res[2]};
129 max_slice =
max_fff(slice_count[0], slice_count[1], slice_count[2]);
133 step_length =
len_v3(dim);
150 if (!show_phi && !show_flags && !show_pressure) {
159 static float white[3] = {1.0f, 1.0f, 1.0f};
170 grp,
"activeColor", (use_constant_color) ? fds->
active_color : white, 1);
202 if (volume_grid ==
NULL) {
239 float texture_to_world[4][4];
243 float invviewmat[4][4];
253 float step_length =
max_ff(1e-16f, dim[axis] * 0.05f);
273 float step_length, max_slice;
276 float slice_count[3] = {resolution[0], resolution[1], resolution[2]};
278 max_slice =
max_fff(slice_count[0], slice_count[1], slice_count[2]);
281 step_length =
len_v3(slice_count);
struct Material * BKE_object_material_get_eval(struct Object *ob, short act)
General operations, lookup, etc. for blender objects.
void BKE_object_dimensions_get(struct Object *ob, float r_vec[3])
const VolumeGrid * BKE_volume_grid_active_get_for_read(const struct Volume *volume)
bool BKE_volume_load(const struct Volume *volume, const struct Main *bmain)
Volume data-block rendering and viewport drawing utilities.
float BKE_volume_density_scale(const struct Volume *volume, const float matrix[4][4])
A dynamically sized string ADT.
MINLINE float max_fff(float a, float b, float c)
MINLINE float max_ff(float a, float b)
MINLINE int axis_dominant_v3_single(const float vec[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void mat4_to_size(float size[3], const float M[4][4])
MINLINE void mul_v3_v3(float r[3], const float a[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void abs_v3(float r[3])
MINLINE void invert_v3(float r[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
void BLI_halton_1d(unsigned int prime, double offset, int n, double *r)
FLUID_DisplayInterpolationMethod
@ FLUID_DISPLAY_INTERP_CLOSEST
@ FLUID_DISPLAY_INTERP_CUBIC
@ FLUID_DISPLAY_INTERP_LINEAR
@ FLUID_DOMAIN_ACTIVE_COLORS
@ FLUID_DOMAIN_ACTIVE_COLOR_SET
@ FLUID_DOMAIN_FIELD_PHI_OUT
@ FLUID_DOMAIN_FIELD_PHI_OBSTACLE
@ FLUID_DOMAIN_FIELD_FLAGS
@ FLUID_DOMAIN_FIELD_PRESSURE
@ FLUID_DOMAIN_FIELD_PHI_IN
VolumeDisplayInterpMethod
@ VOLUME_DISPLAY_INTERP_CLOSEST
@ VOLUME_DISPLAY_INTERP_LINEAR
@ VOLUME_DISPLAY_INTERP_CUBIC
#define VOLUME_MATERIAL_NR
@ DRW_STATE_BLEND_ALPHA_PREMUL
#define DRW_shgroup_uniform_block(shgroup, name, ubo)
#define DRW_shgroup_call(shgroup, geom, ob)
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
struct GPUShader GPUShader
GPUTexture * GPU_texture_create_1d(const char *name, int w, int mip_len, eGPUTextureFormat format, const float *data)
void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *size)
GPUTexture * GPU_texture_create_3d(const char *name, int w, int h, int d, int mip_len, eGPUTextureFormat texture_format, eGPUDataFormat data_format, const void *data)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
GPUBatch * DRW_cache_quad_get(void)
GPUBatch * DRW_cache_cube_get(void)
DRWVolumeGrid * DRW_volume_batch_cache_get_grid(struct Volume *volume, const struct VolumeGrid *grid)
void DRW_smoke_ensure_coba_field(struct FluidModifierData *fmd)
void DRW_smoke_ensure(struct FluidModifierData *fmd, int highres)
DefaultFramebufferList * DRW_viewport_framebuffer_list_get(void)
DefaultTextureList * DRW_viewport_texture_list_get(void)
void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value)
void DRW_shgroup_state_disable(DRWShadingGroup *shgroup, DRWState state)
void DRW_shgroup_uniform_texture(DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex)
void DRW_shgroup_state_enable(DRWShadingGroup *shgroup, DRWState state)
void DRW_shgroup_uniform_vec3_copy(DRWShadingGroup *shgroup, const char *name, const float *value)
void DRW_shgroup_uniform_vec3(DRWShadingGroup *shgroup, const char *name, const float *value, int arraysize)
void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value)
DRWShadingGroup * DRW_shgroup_create(struct GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_texture_ref(DRWShadingGroup *shgroup, const char *name, GPUTexture **tex)
DRWPass * DRW_pass_create(const char *name, DRWState state)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
void DRW_shgroup_uniform_mat4(DRWShadingGroup *shgroup, const char *name, const float(*value)[4])
void DRW_view_viewmat_get(const DRWView *view, float mat[4][4], bool inverse)
void DRW_draw_pass(DRWPass *pass)
ccl_gpu_kernel_postfix ccl_global float int int int int sh
float texture_to_object[4][4]
struct GPUTexture * texture
float object_to_texture[4][4]
struct GPUFrameBuffer * color_only_fb
struct GPUTexture * depth
struct GPUTexture * tex_density
struct GPUTexture * tex_color
struct GPUTexture * tex_field
struct GPUTexture * tex_shadow
struct GPUTexture * tex_coba
struct GPUTexture * tex_flame
struct GPUTexture * tex_flame_coba
struct FluidDomainSettings * domain
WORKBENCH_StorageList * stl
WORKBENCH_TextureList * txl
struct DRWPass * volume_ps
struct GPUUniformBuf * world_ubo
struct WORKBENCH_PrivateData * wpd
struct GPUTexture * dummy_coba_tx
struct GPUTexture * dummy_volume_tx
struct GPUTexture * dummy_shadow_tx
void workbench_material_ubo_data(WORKBENCH_PrivateData *wpd, Object *ob, Material *mat, WORKBENCH_UBO_Material *data, eV3DShadingColorType color_type)
eWORKBENCH_VolumeInterpType
@ WORKBENCH_VOLUME_INTERP_CUBIC
@ WORKBENCH_VOLUME_INTERP_LINEAR
@ WORKBENCH_VOLUME_INTERP_CLOSEST
GPUShader * workbench_shader_volume_get(bool slice, bool coba, eWORKBENCH_VolumeInterpType interp_type, bool smoke)
void workbench_volume_cache_init(WORKBENCH_Data *vedata)
void workbench_volume_draw_pass(WORKBENCH_Data *vedata)
static void workbench_volume_modifier_cache_populate(WORKBENCH_Data *vedata, Object *ob, ModifierData *md)
void workbench_volume_cache_populate(WORKBENCH_Data *vedata, Scene *UNUSED(scene), Object *ob, ModifierData *md, eV3DShadingColorType color_type)
static void workbench_volume_material_color(WORKBENCH_PrivateData *wpd, Object *ob, eV3DShadingColorType color_type, float color[3])
static void workbench_volume_object_cache_populate(WORKBENCH_Data *vedata, Object *ob, eV3DShadingColorType color_type)
void workbench_volume_engine_init(WORKBENCH_Data *vedata)