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:
authorClément Foucault <foucault.clem@gmail.com>2019-03-14 00:35:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-14 01:15:11 +0300
commitd0fb0d0a9d0d698a499d7e38943696a43a7e456e (patch)
tree22a118d2b1858da9228baad4161d46c0a9175a5e /source/blender/gpu
parentbbc3ee09e44bfaba1ca2d4ab6a6bf2a51976cdae (diff)
Fix T60170: Eevee: smoke color does not apply permanently
This was because color is not present in the density texture if there is only one constant color. Adding it as a uniform.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index df1a0b9e2a8..d91b6b77b86 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -1701,6 +1701,8 @@ void node_attribute_volume_density(sampler3D tex, out vec4 outcol, out vec3 outv
outf = dot(vec3(1.0 / 3.0), outvec);
}
+uniform vec3 volumeColor = vec3(1.0);
+
void node_attribute_volume_color(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf)
{
#if defined(MESH_SHADER) && defined(VOLUMETRICS)
@@ -1714,7 +1716,7 @@ void node_attribute_volume_color(sampler3D tex, out vec4 outcol, out vec3 outvec
if (value.a > 1e-8)
value.rgb /= value.a;
- outvec = value.rgb;
+ outvec = value.rgb * volumeColor;
outcol = vec4(outvec, 1.0);
outf = dot(vec3(1.0 / 3.0), outvec);
}