未验证 提交 e2364f25 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #18989 from Mugen87/dev3

WebGLShadowMap: Stop support of Geometry when using morph targets.
......@@ -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;
......@@ -299,15 +297,7 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
if ( material.morphTargets === true ) {
if ( geometry.isBufferGeometry === true ) {
useMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0;
} else if ( geometry.isGeometry === true ) {
useMorphing = geometry.morphTargets && geometry.morphTargets.length > 0;
}
useMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0;
}
......@@ -426,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 );
......@@ -436,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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册