diff options
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_volume_principled.cc')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_volume_principled.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc b/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc index d4d5c4789ed..07e700e550a 100644 --- a/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc +++ b/source/blender/nodes/shader/nodes/node_shader_volume_principled.cc @@ -93,17 +93,15 @@ static int node_shader_gpu_volume_principled(GPUMaterial *mat, } /* Default values if attributes not found. */ + static float white[4] = {1.0f, 1.0f, 1.0f, 1.0f}; if (!density) { - static float one = 1.0f; - density = GPU_constant(&one); + density = GPU_constant(white); } if (!color) { - static float white[4] = {1.0f, 1.0f, 1.0f, 1.0f}; color = GPU_constant(white); } if (!temperature) { - static float one = 1.0f; - temperature = GPU_constant(&one); + temperature = GPU_constant(white); } /* Create blackbody spectrum. */ |