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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user