Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index bcaa95c2f59..066b8d633d2 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -335,6 +335,7 @@ static int codegen_process_uniforms_functions(GPUMaterial *material,
/* Volume Grids */
for (GPUMaterialVolumeGrid *grid = graph->volume_grids.first; grid; grid = grid->next) {
BLI_dynstr_appendf(ds, "uniform sampler3D %s;\n", grid->sampler_name);
+ BLI_dynstr_appendf(ds, "uniform mat4 %s = mat4(0.0);\n", grid->transform_name);
}
/* Print other uniforms */
@@ -432,6 +433,9 @@ static void codegen_call_functions(DynStr *ds, GPUNodeGraph *graph, GPUOutput *f
else if (input->source == GPU_SOURCE_VOLUME_GRID) {
BLI_dynstr_append(ds, input->volume_grid->sampler_name);
}
+ else if (input->source == GPU_SOURCE_VOLUME_GRID_TRANSFORM) {
+ BLI_dynstr_append(ds, input->volume_grid->transform_name);
+ }
else if (input->source == GPU_SOURCE_OUTPUT) {
codegen_convert_datatype(
ds, input->link->output->type, input->type, "tmp", input->link->output->id);