Skip to content

Commit 2d924bc

Browse files
committed
computeLight_fp: fix compilation when r_highPrecisionRendering is disabled
1 parent 2ee569b commit 2d924bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/engine/renderer/glsl_source/computeLight_fp.glsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,20 +177,20 @@ int nextIdx( inout idxs_t idxs ) {
177177
idxs = idxs >> 2;
178178
return int( tmp.x + tmp.y + tmp.z + tmp.w );
179179
}
180-
#else // !HAVE_EXT_texture_integer
180+
#else // !HAVE_EXT_texture_integer || !r_highPrecisionRendering
181181
const int lightsPerLayer = 4;
182-
uniform sampler3D u_LightTiles;
182+
uniform usampler3D u_LightTilesInt;
183183
#define idxs_t vec4
184-
idxs_t fetchIdxs( in vec3 coords ) {
185-
return texture3D( u_LightTiles, coords ) * 255.0;
184+
idxs_t fetchIdxs( in vec3 coords, in usampler3D u_LightTilesInt ) {
185+
return texture3D( u_LightTilesInt, coords ) * 255.0;
186186
}
187187
int nextIdx( inout idxs_t idxs ) {
188188
vec4 tmp = idxs;
189189
idxs = floor(idxs * 0.25);
190190
tmp -= 4.0 * idxs;
191191
return int( dot( tmp, vec4( 64.0, 16.0, 4.0, 1.0 ) ) );
192192
}
193-
#endif // HAVE_EXT_texture_integer
193+
#endif // !HAVE_EXT_texture_integer || !r_highPrecisionRendering
194194

195195
const int numLayers = MAX_REF_LIGHTS / 256;
196196

0 commit comments

Comments
 (0)