Commit: d966ce718b9d93fd74b68556903b72c29a52ebd3
Author: Jeroen Bakker
Date: Mon Aug 22 10:36:38 2022 +0200
Branches: master
https://developer.blender.org/rBd966ce718b9d93fd74b68556903b72c29a52ebd3
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.
===================================================================
M source/blender/draw/intern/shaders/common_intersect_lib.glsl
===================================================================
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;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs