|
1 | | -import { BackSide, DoubleSide, CubeUVReflectionMapping, ObjectSpaceNormalMap, TangentSpaceNormalMap, NoToneMapping, NormalBlending, LinearSRGBColorSpace } from '../../constants.js'; |
| 1 | +import { BackSide, DoubleSide, CubeUVReflectionMapping, ObjectSpaceNormalMap, TangentSpaceNormalMap, NoToneMapping, NormalBlending, LinearSRGBColorSpace, SRGBColorSpace } from '../../constants.js'; |
2 | 2 | import { Layers } from '../../core/Layers.js'; |
3 | 3 | import { WebGLProgram } from './WebGLProgram.js'; |
4 | 4 | import { WebGLShaderCache } from './WebGLShaderCache.js'; |
@@ -335,6 +335,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities |
335 | 335 | toneMapping: toneMapping, |
336 | 336 | useLegacyLights: renderer._useLegacyLights, |
337 | 337 |
|
| 338 | + decodeVideoTexture: HAS_MAP && ( material.map.isVideoTexture === true ) && ( material.map.colorSpace === SRGBColorSpace ), |
| 339 | + |
338 | 340 | premultipliedAlpha: material.premultipliedAlpha, |
339 | 341 |
|
340 | 342 | doubleSided: material.side === DoubleSide, |
@@ -536,6 +538,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities |
536 | 538 | _programLayers.enable( 17 ); |
537 | 539 | if ( parameters.pointsUvs ) |
538 | 540 | _programLayers.enable( 18 ); |
| 541 | + if ( parameters.decodeVideoTexture ) |
| 542 | + _programLayers.enable( 19 ); |
539 | 543 |
|
540 | 544 | array.push( _programLayers.mask ); |
541 | 545 |
|
|
0 commit comments