From c98b65b82f3e4ca83c24ce7fc2af4868110498ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 6 Aug 2019 16:50:40 +0200 Subject: [PATCH] Shaders: fix setup of the tangent attribute on ES2. Yay tests! --- src/Magnum/Shaders/Phong.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Magnum/Shaders/Phong.cpp b/src/Magnum/Shaders/Phong.cpp index 6936dbf7a..5dab73cab 100644 --- a/src/Magnum/Shaders/Phong.cpp +++ b/src/Magnum/Shaders/Phong.cpp @@ -118,6 +118,8 @@ Phong::Phong(const Flags flags, const UnsignedInt lightCount): _flags{flags}, _l { bindAttributeLocation(Position::Location, "position"); bindAttributeLocation(Normal::Location, "normal"); + if(flags & Flag::NormalTexture) + bindAttributeLocation(Tangent::Location, "tangent"); if(flags & (Flag::AmbientTexture|Flag::DiffuseTexture|Flag::SpecularTexture)) bindAttributeLocation(TextureCoordinates::Location, "textureCoordinates"); }