Merge pull request #82892 from clayjohn/tangent-binormal-transform
Only perform modelview transform on tangent and binormal when vertex shader is in local space
This commit is contained in:
commit
c05f521e16
|
@ -417,13 +417,12 @@ void main() {
|
|||
normal = modelview_normal * normal;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
|
||||
|
||||
binormal = modelview_normal * binormal;
|
||||
tangent = modelview_normal * tangent;
|
||||
#endif
|
||||
#endif // !defined(SKIP_TRANSFORM_USED) && !defined(VERTEX_WORLD_COORDS_USED)
|
||||
|
||||
// Using world coordinates
|
||||
#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED)
|
||||
|
|
|
@ -411,13 +411,12 @@ void vertex_shader(vec3 vertex_input,
|
|||
normal = modelview_normal * normal;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TANGENT_USED
|
||||
|
||||
binormal = modelview_normal * binormal;
|
||||
tangent = modelview_normal * tangent;
|
||||
#endif
|
||||
#endif // !defined(SKIP_TRANSFORM_USED) && !defined(VERTEX_WORLD_COORDS_USED)
|
||||
|
||||
//using world coordinates
|
||||
#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED)
|
||||
|
|
|
@ -408,13 +408,12 @@ void main() {
|
|||
normal = modelview_normal * normal;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
|
||||
|
||||
binormal = modelview_normal * binormal;
|
||||
tangent = modelview_normal * tangent;
|
||||
#endif
|
||||
#endif // !defined(SKIP_TRANSFORM_USED) && !defined(VERTEX_WORLD_COORDS_USED)
|
||||
|
||||
//using world coordinates
|
||||
#if !defined(SKIP_TRANSFORM_USED) && defined(VERTEX_WORLD_COORDS_USED)
|
||||
|
|
Loading…
Reference in New Issue