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:
Jeroen Bakker 2022-08-22 10:36:38 +02:00
parent 0aeae0d0b9
commit d966ce718b
1 changed files with 1 additions and 2 deletions

View File

@ -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;