-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Labels
Description
Description
When adding batching shading I noticed that the tangent seemed to not be transformed by the instance matrix - is this a bug?
| #ifdef USE_TANGENT | |
| vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; | |
| #ifdef FLIP_SIDED | |
| transformedTangent = - transformedTangent; | |
| #endif | |
| #endif |
Reproduction steps
Issue found by looking at shader code.
Code
From defaultnormal_vertex.glsl.js:
#ifdef USE_TANGENT
vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#ifdef FLIP_SIDED
transformedTangent = - transformedTangent;
#endif
#endifLive example
Issue found by looking at shader code.
Screenshots
No response
Version
dev
Device
No response
Browser
No response
OS
No response
Mugen87