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