|
|
@@ -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 ] ) );
|