|
@@ -277,9 +277,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
- function getDepthMaterial( object, material, light, shadowCameraNear, shadowCameraFar, type ) {
|
|
|
-
|
|
|
- var geometry = object.geometry;
|
|
|
+ function getDepthMaterial( object, geometry, material, light, shadowCameraNear, shadowCameraFar, type ) {
|
|
|
|
|
|
var result = null;
|
|
|
|
|
@@ -418,7 +416,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
|
|
|
|
|
|
if ( groupMaterial && groupMaterial.visible ) {
|
|
|
|
|
|
- var depthMaterial = getDepthMaterial( object, groupMaterial, light, shadowCamera.near, shadowCamera.far, type );
|
|
|
+ var depthMaterial = getDepthMaterial( object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type );
|
|
|
|
|
|
_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group );
|
|
|
|
|
@@ -428,7 +426,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
|
|
|
|
|
|
} else if ( material.visible ) {
|
|
|
|
|
|
- var depthMaterial = getDepthMaterial( object, material, light, shadowCamera.near, shadowCamera.far, type );
|
|
|
+ var depthMaterial = getDepthMaterial( object, geometry, material, light, shadowCamera.near, shadowCamera.far, type );
|
|
|
|
|
|
_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null );
|
|
|
|