Skip to content

Commit

Permalink
WebGLPrograms: Fix broken fog check. (#24439)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Aug 3, 2022
1 parent 920a716 commit 50f7722
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/renderers/webgl/WebGLPrograms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit 50f7722

Please sign in to comment.