浏览代码

Merge pull request #19927 from WestLangley/dev_shadowmap_stencil

WebGLShadowMap: disable stencil buffer
Mr.doob 5 年之前
父节点
当前提交
1d79f2a8ef
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/renderers/webgl/WebGLShadowMap.js

+ 2 - 2
src/renderers/webgl/WebGLShadowMap.js

@@ -141,7 +141,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
 
 
 			if ( shadow.map === null && ! shadow.isPointLightShadow && this.type === VSMShadowMap ) {
 			if ( shadow.map === null && ! shadow.isPointLightShadow && this.type === VSMShadowMap ) {
 
 
-				const pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };
+				const pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat, stencilBuffer: false };
 
 
 				shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
 				shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
 				shadow.map.texture.name = light.name + ".shadowMap";
 				shadow.map.texture.name = light.name + ".shadowMap";
@@ -154,7 +154,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
 
 
 			if ( shadow.map === null ) {
 			if ( shadow.map === null ) {
 
 
-				const pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat };
+				const pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat, stencilBuffer: false };
 
 
 				shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
 				shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
 				shadow.map.texture.name = light.name + ".shadowMap";
 				shadow.map.texture.name = light.name + ".shadowMap";