瀏覽代碼

Merge pull request #14379 from ClinicalGraphics/fix/inverted-normals-camera-scale-negative

determine if normals are flipped by a reflection in the normalMatrix instead of object.matrixWorld
Mr.doob 7 年之前
父節點
當前提交
e1b6c60e41
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/renderers/WebGLRenderer.js

+ 2 - 2
src/renderers/WebGLRenderer.js

@@ -676,7 +676,7 @@ function WebGLRenderer( parameters ) {
 
 	this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
 
-		var frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 );
+		var frontFaceCW = ( object.isMesh && object.normalMatrix.determinant() < 0 );
 
 		state.setMaterial( material, frontFaceCW );
 
@@ -1406,7 +1406,7 @@ function WebGLRenderer( parameters ) {
 
 		if ( object.isImmediateRenderObject ) {
 
-			var frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 );
+			var frontFaceCW = ( object.isMesh && object.normalMatrix.determinant() < 0 );
 
 			state.setMaterial( material, frontFaceCW );