Fix T47697: Smoke simulation doesn't work in viewport
Seems to be a division by zero error. Should be safe for an upcoming 'a' release.
This commit is contained in:
parent
9c2704c169
commit
7bce3dd3ad
Notes:
blender-bot
2023-02-14 08:07:50 +01:00
Referenced by issue #47697, Smoke simulation doesn't work in viewport
|
@ -17,7 +17,13 @@ void main()
|
|||
{
|
||||
/* compute color and density from volume texture */
|
||||
vec4 soot = texture3D(soot_texture, coords);
|
||||
vec3 soot_color = active_color * soot.rgb / soot.a;
|
||||
vec3 soot_color;
|
||||
if (soot.a != 0) {
|
||||
soot_color = active_color * soot.rgb / soot.a;
|
||||
}
|
||||
else {
|
||||
soot_color = vec3(0, 0, 0);
|
||||
}
|
||||
float soot_density = density_scale * soot.a;
|
||||
|
||||
/* compute transmittance and alpha */
|
||||
|
|
Loading…
Reference in New Issue