Skip to content

Commit f4bc350

Browse files
authored
Only use float textures if linear interpolation is supported (#27315)
1 parent 03c2218 commit f4bc350

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/renderers/webgl/WebGLLights.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,17 @@ function WebGLLights( extensions, capabilities ) {
403403

404404
// WebGL 2
405405

406-
state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;
407-
state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;
406+
if ( extensions.has( 'OES_texture_float_linear' ) === true ) {
407+
408+
state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;
409+
state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;
410+
411+
} else {
412+
413+
state.rectAreaLTC1 = UniformsLib.LTC_HALF_1;
414+
state.rectAreaLTC2 = UniformsLib.LTC_HALF_2;
415+
416+
}
408417

409418
} else {
410419

0 commit comments

Comments
 (0)