|
@@ -407,19 +407,32 @@ function WebGLLights( extensions, capabilities ) {
|
|
|
|
|
|
if ( rectAreaLength > 0 ) {
|
|
|
|
|
|
- if ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float_linear' ) ) {
|
|
|
+ if ( capabilities.isWebGL2 ) {
|
|
|
+
|
|
|
+ // WebGL 2
|
|
|
|
|
|
state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;
|
|
|
state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;
|
|
|
|
|
|
- } else if ( extensions.has( 'OES_texture_half_float_linear' ) ) {
|
|
|
+ } else {
|
|
|
|
|
|
- state.rectAreaLTC1 = UniformsLib.LTC_HALF_1;
|
|
|
- state.rectAreaLTC2 = UniformsLib.LTC_HALF_2;
|
|
|
+ // WebGL 1
|
|
|
|
|
|
- } else {
|
|
|
+ if ( extensions.has( 'OES_texture_float_linear' ) == true ) {
|
|
|
+
|
|
|
+ state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;
|
|
|
+ state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;
|
|
|
+
|
|
|
+ } else if ( extensions.has( 'OES_texture_half_float_linear' ) == true ) {
|
|
|
|
|
|
- console.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' );
|
|
|
+ state.rectAreaLTC1 = UniformsLib.LTC_HALF_1;
|
|
|
+ state.rectAreaLTC2 = UniformsLib.LTC_HALF_2;
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ console.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|