Просмотр исходного кода

Shaders: Make comments more explicit (#34038)

WestLangley 1 неделя назад
Родитель
Сommit
959b2f0f08
1 измененных файлов с 4 добавлено и 2 удалено
  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
 
 	// 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 );
 	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
 
 	// 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 );
 	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );

粤ICP备19079148号