diff --git a/src/renderers/webgl/WebGLPrograms.js b/src/renderers/webgl/WebGLPrograms.js index d70851732d83f9..b5607758416325 100644 --- a/src/renderers/webgl/WebGLPrograms.js +++ b/src/renderers/webgl/WebGLPrograms.js @@ -382,60 +382,60 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities _programLayers.enable( 31 ); if ( parameters.uvsVertexOnly ) _programLayers.enable( 32 ); - if ( parameters.fog ) - _programLayers.enable( 33 ); array.push( _programLayers.mask ); _programLayers.disableAll(); - if ( parameters.useFog ) + if ( parameters.fog ) _programLayers.enable( 0 ); - if ( parameters.flatShading ) + if ( parameters.useFog ) _programLayers.enable( 1 ); - if ( parameters.logarithmicDepthBuffer ) + if ( parameters.flatShading ) _programLayers.enable( 2 ); - if ( parameters.skinning ) + if ( parameters.logarithmicDepthBuffer ) _programLayers.enable( 3 ); - if ( parameters.morphTargets ) + if ( parameters.skinning ) _programLayers.enable( 4 ); - if ( parameters.morphNormals ) + if ( parameters.morphTargets ) _programLayers.enable( 5 ); - if ( parameters.morphColors ) + if ( parameters.morphNormals ) _programLayers.enable( 6 ); - if ( parameters.premultipliedAlpha ) + if ( parameters.morphColors ) _programLayers.enable( 7 ); - if ( parameters.shadowMapEnabled ) + if ( parameters.premultipliedAlpha ) _programLayers.enable( 8 ); - if ( parameters.physicallyCorrectLights ) + if ( parameters.shadowMapEnabled ) _programLayers.enable( 9 ); - if ( parameters.doubleSided ) + if ( parameters.physicallyCorrectLights ) _programLayers.enable( 10 ); - if ( parameters.flipSided ) + if ( parameters.doubleSided ) _programLayers.enable( 11 ); - if ( parameters.useDepthPacking ) + if ( parameters.flipSided ) _programLayers.enable( 12 ); - if ( parameters.dithering ) + if ( parameters.useDepthPacking ) _programLayers.enable( 13 ); - if ( parameters.specularIntensityMap ) + if ( parameters.dithering ) _programLayers.enable( 14 ); - if ( parameters.specularColorMap ) + if ( parameters.specularIntensityMap ) _programLayers.enable( 15 ); - if ( parameters.transmission ) + if ( parameters.specularColorMap ) _programLayers.enable( 16 ); - if ( parameters.transmissionMap ) + if ( parameters.transmission ) _programLayers.enable( 17 ); - if ( parameters.thicknessMap ) + if ( parameters.transmissionMap ) _programLayers.enable( 18 ); - if ( parameters.sheen ) + if ( parameters.thicknessMap ) _programLayers.enable( 19 ); - if ( parameters.sheenColorMap ) + if ( parameters.sheen ) _programLayers.enable( 20 ); - if ( parameters.sheenRoughnessMap ) + if ( parameters.sheenColorMap ) _programLayers.enable( 21 ); - if ( parameters.decodeVideoTexture ) + if ( parameters.sheenRoughnessMap ) _programLayers.enable( 22 ); - if ( parameters.opaque ) + if ( parameters.decodeVideoTexture ) _programLayers.enable( 23 ); + if ( parameters.opaque ) + _programLayers.enable( 24 ); array.push( _programLayers.mask );