Fix vector type for signed tangent in mobile shader
This commit is contained in:
parent
8fa9d1ae46
commit
708222bb9a
1 changed files with 1 additions and 1 deletions
|
@ -240,7 +240,7 @@ void main() {
|
|||
#endif
|
||||
|
||||
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
|
||||
vec3 signed_tangent_attrib = tangent_attrib * 2.0 - 1.0;
|
||||
vec2 signed_tangent_attrib = tangent_attrib * 2.0 - 1.0;
|
||||
vec3 tangent = oct_to_vec3(vec2(signed_tangent_attrib.x, abs(signed_tangent_attrib.y) * 2.0 - 1.0));
|
||||
float binormalf = sign(signed_tangent_attrib.y);
|
||||
vec3 binormal = normalize(cross(normal, tangent) * binormalf);
|
||||
|
|
Loading…
Reference in a new issue