Browse Source

WebGLShadowMap minor clean up.

Mr.doob 8 years ago
parent
commit
5740f920b3
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/renderers/WebGLRenderer.js
  2. 2 2
      src/renderers/webgl/WebGLShadowMap.js

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -309,7 +309,7 @@ function WebGLRenderer( parameters ) {
 
 	// shadow map
 
-	var shadowMap = new WebGLShadowMap( this, shadowsArray, objects, capabilities );
+	var shadowMap = new WebGLShadowMap( _this, shadowsArray, objects, capabilities.maxTextureSize );
 
 	this.shadowMap = shadowMap;
 

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

@@ -15,7 +15,7 @@ import { Vector2 } from '../../math/Vector2';
 import { Matrix4 } from '../../math/Matrix4';
 import { Frustum } from '../../math/Frustum';
 
-function WebGLShadowMap( _renderer, _shadows, _objects, capabilities ) {
+function WebGLShadowMap( _renderer, _shadows, _objects, maxTextureSize ) {
 
 	var _gl = _renderer.context,
 		_state = _renderer.state,
@@ -23,7 +23,7 @@ function WebGLShadowMap( _renderer, _shadows, _objects, capabilities ) {
 		_projScreenMatrix = new Matrix4(),
 
 		_shadowMapSize = new Vector2(),
-		_maxShadowMapSize = new Vector2( capabilities.maxTextureSize, capabilities.maxTextureSize ),
+		_maxShadowMapSize = new Vector2( maxTextureSize, maxTextureSize ),
 
 		_lookTarget = new Vector3(),
 		_lightPositionWorld = new Vector3(),