Quellcode durchsuchen

Shaders: Make comments more explicit (#34038)

WestLangley vor 1 Woche
Ursprung
Commit
959b2f0f08
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js

+ 4 - 2
src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js

@@ -10,7 +10,8 @@ vec3 transformedNormal = objectNormal;
 #ifdef USE_BATCHING
 #ifdef USE_BATCHING
 
 
 	// this is in lieu of a per-instance normal-matrix
 	// this is in lieu of a per-instance normal-matrix
-	// shear transforms in the instance matrix are not supported
+	// non-uniform scaling in the instance matrix is supported
+	// shear transforms are not supported
 
 
 	mat3 bm = mat3( batchingMatrix );
 	mat3 bm = mat3( batchingMatrix );
 	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
 	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
@@ -27,7 +28,8 @@ vec3 transformedNormal = objectNormal;
 #ifdef USE_INSTANCING
 #ifdef USE_INSTANCING
 
 
 	// this is in lieu of a per-instance normal-matrix
 	// this is in lieu of a per-instance normal-matrix
-	// shear transforms in the instance matrix are not supported
+	// non-uniform scaling in the instance matrix is supported
+	// shear transforms are not supported
 
 
 	mat3 im = mat3( instanceMatrix );
 	mat3 im = mat3( instanceMatrix );
 	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
 	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );

粤ICP备19079148号