diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-08-22 11:36:38 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-08-22 11:36:38 +0300 |
commit | d966ce718b9d93fd74b68556903b72c29a52ebd3 (patch) | |
tree | 476fcaca78ab881e2dca28330a2e32650dc328ab /source/blender/draw | |
parent | 0aeae0d0b9810fea0214fc60d41652684135c177 (diff) |
EEVEE-Next: Fix shader compilation error.
Due to a copy-paste error there was an out of bound read. Some drivers
didn't complain about it, others did. This patch fixes the compilation
error by accessing the array within bounds.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/shaders/common_intersect_lib.glsl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/intern/shaders/common_intersect_lib.glsl b/source/blender/draw/intern/shaders/common_intersect_lib.glsl index 708d361029a..33378588553 100644 --- a/source/blender/draw/intern/shaders/common_intersect_lib.glsl +++ b/source/blender/draw/intern/shaders/common_intersect_lib.glsl @@ -353,8 +353,7 @@ bool intersect(IsectFrustum i_frustum, Box box) bool intersect(IsectFrustum i_frustum, Sphere sphere) { bool intersects = true; - - for (int p = 0; p < 8; ++p) { + for (int p = 0; p < 6; ++p) { float dist_to_plane = dot(i_frustum.planes[p], vec4(sphere.center, 1.0)); if (dist_to_plane < -sphere.radius) { intersects = false; |