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-06-04 13:52:00 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-06-04 19:42:37 +0300
commitff7401b02c4b9e111c0632f33bf5b51fc63026f6 (patch)
tree6607073aeaa4fcb0a58a727c077c7790de83021d /source/blender
parent2e4d27669be4ca0b964489467329f73f072d7b44 (diff)
Fix T64214 Eevee: Issue with Emission node and Alpha blending
Emission node was outputing alpha information but is was not supposed to. Match cycles reference.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 7f37e741591..3b1ad41ad95 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -1797,14 +1797,12 @@ void node_wireframe_screenspace(float size, vec2 barycentric, out float fac)
void node_emission(vec4 color, float strength, vec3 vN, out Closure result)
{
-#ifndef VOLUMETRICS
- color *= strength;
result = CLOSURE_DEFAULT;
- result.radiance = color.rgb;
- result.opacity = color.a;
+#ifndef VOLUMETRICS
+ result.radiance = color.rgb * strength;
result.ssr_normal = normal_encode(vN, viewCameraVec);
#else
- result = Closure(vec3(0.0), vec3(0.0), color.rgb * strength, 0.0);
+ result.emission = color.rgb * strength;
#endif
}