Skip to content

Commit

Permalink
computeLight_fp: fix compilation when r_highPrecisionRendering is dis…
Browse files Browse the repository at this point in the history
…abled
  • Loading branch information
illwieckz committed Sep 19, 2024
1 parent 2ee569b commit 2d924bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/engine/renderer/glsl_source/computeLight_fp.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,20 @@ int nextIdx( inout idxs_t idxs ) {
idxs = idxs >> 2;
return int( tmp.x + tmp.y + tmp.z + tmp.w );
}
#else // !HAVE_EXT_texture_integer
#else // !HAVE_EXT_texture_integer || !r_highPrecisionRendering
const int lightsPerLayer = 4;
uniform sampler3D u_LightTiles;
uniform usampler3D u_LightTilesInt;
#define idxs_t vec4
idxs_t fetchIdxs( in vec3 coords ) {
return texture3D( u_LightTiles, coords ) * 255.0;
idxs_t fetchIdxs( in vec3 coords, in usampler3D u_LightTilesInt ) {
return texture3D( u_LightTilesInt, coords ) * 255.0;
}
int nextIdx( inout idxs_t idxs ) {
vec4 tmp = idxs;
idxs = floor(idxs * 0.25);
tmp -= 4.0 * idxs;
return int( dot( tmp, vec4( 64.0, 16.0, 4.0, 1.0 ) ) );
}
#endif // HAVE_EXT_texture_integer
#endif // !HAVE_EXT_texture_integer || !r_highPrecisionRendering

const int numLayers = MAX_REF_LIGHTS / 256;

Expand Down

0 comments on commit 2d924bc

Please sign in to comment.