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-10-17 17:17:10 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-10-17 18:40:30 +0300
commit4142f3993cd8fcafe2c594962487375e87f53ac0 (patch)
tree74c94e348fb1da28fe67f24809bb4b8a100debe6 /source/blender/draw/engines
parentade2129f14dbc7a7e60b9fcde7381a5ab53b0035 (diff)
Fix T70811 EEVEE: Alpha clip/hashed cause wrong alpha values
Was caused by division not giving a fully opaque alpha value.
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
index 511c243b474..f10d98e68bd 100644
--- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
@@ -965,7 +965,8 @@ void main()
# ifndef USE_ALPHA_BLEND
float alpha_div = 1.0 / max(1e-8, alpha);
- outRadiance *= alpha_div;
+ outRadiance.rgb *= alpha_div;
+ outRadiance.a = 1.0;
ssrData.rgb *= alpha_div;
# ifdef USE_SSS
sssAlbedo.rgb *= alpha_div;