Skip to content

Commit 79f0dc5

Browse files
authored
Merge pull request #15568 from Mugen87/dev21
WebGLShadowMap: Fix blending bug
2 parents 41284c6 + 918d442 commit 79f0dc5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/renderers/webgl/WebGLShadowMap.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author mrdoob / http://mrdoob.com/
44
*/
55

6-
import { FrontSide, BackSide, DoubleSide, RGBAFormat, NearestFilter, PCFShadowMap, RGBADepthPacking } from '../../constants.js';
6+
import { FrontSide, BackSide, DoubleSide, RGBAFormat, NearestFilter, PCFShadowMap, RGBADepthPacking, NoBlending } from '../../constants.js';
77
import { WebGLRenderTarget } from '../WebGLRenderTarget.js';
88
import { MeshDepthMaterial } from '../../materials/MeshDepthMaterial.js';
99
import { MeshDistanceMaterial } from '../../materials/MeshDistanceMaterial.js';
@@ -100,12 +100,10 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
100100

101101
if ( lights.length === 0 ) return;
102102

103-
// TODO Clean up (needed in case of contextlost)
104-
var _gl = _renderer.context;
105103
var _state = _renderer.state;
106104

107105
// Set GL state for depth map.
108-
_state.disable( _gl.BLEND );
106+
_state.setBlending( NoBlending );
109107
_state.buffers.color.setClear( 1, 1, 1, 1 );
110108
_state.buffers.depth.setTest( true );
111109
_state.setScissorTest( false );

0 commit comments

Comments
 (0)