diff options
author | clayjohn <claynjohn@gmail.com> | 2023-10-05 22:05:44 -0600 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2023-10-05 22:08:36 -0600 |
commit | af1d81d95a9bced2e4c05488d8117963d1620863 (patch) | |
tree | 14d7cd750788bee48ece70a2d43c7b09a0bd8ba1 /drivers/gles3/shaders | |
parent | f2ba8ec6ca2e4ff493cba11f95621d10ab8bb363 (diff) | |
download | redot-engine-af1d81d95a9bced2e4c05488d8117963d1620863.tar.gz |
Only perform modelview transform on tangent and binormal when vertex shader is in local space
Diffstat (limited to 'drivers/gles3/shaders')
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index c98b5f3ed7..5a1c6c1521 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -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) |