[Bf-blender-cvs] [9673deb3072] tmp-eevee-shadow-commit-mp: EEVEE Shadows: Fix transparent bbox size

Miguel Pozo noreply at git.blender.org
Mon Feb 6 19:57:49 CET 2023


Commit: 9673deb3072bdbfc7eb8ce7ec2c4407364617cbb
Author: Miguel Pozo
Date:   Mon Feb 6 19:57:35 2023 +0100
Branches: tmp-eevee-shadow-commit-mp
https://developer.blender.org/rB9673deb3072bdbfc7eb8ce7ec2c4407364617cbb

EEVEE Shadows: Fix transparent bbox size

Box vertices goes from -1 to +1

===================================================================

M	source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tag_usage_vert.glsl

===================================================================

diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tag_usage_vert.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tag_usage_vert.glsl
index 130ce6512b2..b6a876193b1 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tag_usage_vert.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_shadow_tag_usage_vert.glsl
@@ -13,10 +13,10 @@ void main()
   ObjectBounds bounds = bounds_buf[drw_ResourceID];
 
   interp.P = bounds.bounding_corners[0].xyz;
-  interp.P += bounds.bounding_corners[1].xyz * pos.x;
-  interp.P += bounds.bounding_corners[2].xyz * pos.y;
-  interp.P += bounds.bounding_corners[3].xyz * pos.z;
+  interp.P += bounds.bounding_corners[1].xyz * max(0, pos.x);
+  interp.P += bounds.bounding_corners[2].xyz * max(0, pos.y);
+  interp.P += bounds.bounding_corners[3].xyz * max(0, pos.z);
   interp.vP = point_world_to_view(interp.P);
 
   gl_Position = point_world_to_ndc(interp.P);
-}
\ No newline at end of file
+}



More information about the Bf-blender-cvs mailing list