提交 d50c8916 编写于 作者: O Ondřej Španěl

A different way to fix (faster, not computing normalMatrix).

上级 1968a0d7
......@@ -706,7 +706,7 @@ function WebGLRenderer( parameters ) {
this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
var frontFaceCW = ( object.isMesh && object.normalMatrix.determinant() < 0 );
var frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 );
state.setMaterial( material, frontFaceCW );
......
......@@ -383,7 +383,6 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
if ( object.castShadow && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) {
object.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );
object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
var geometry = _objects.update( object );
var material = object.material;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册