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>2018-11-06 16:53:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-07 02:19:14 +0300
commit8a204ccdb49bd682e41a5d706726c3c77f6217fd (patch)
tree407ddb63d644dc839b82c7bd1b142a1202590908 /source/blender/gpu/shaders
parentbc1c263a8ada7541b4de2544757b1a765ffab0b3 (diff)
Eevee: Support monochromatic Transparent BSDF correctly
This fits Cycles better even if it is only for grey scale values. This only work if the blend mode is Alpha Blend or Alpha Hashed.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index e24cf8da989..3ddf1aefe4d 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -1351,7 +1351,7 @@ void node_bsdf_transparent(vec4 color, out Closure result)
/* this isn't right */
result = CLOSURE_DEFAULT;
result.radiance = vec3(0.0);
- result.opacity = 0.0;
+ result.opacity = clamp(1.0 - dot(color.rgb, vec3(0.3333334)), 0.0, 1.0);
result.ssr_id = TRANSPARENT_CLOSURE_FLAG;
}