1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +00:00

Fixes and proper tangent space

This commit is contained in:
Gefüllte Taubenbrust 2024-11-11 17:07:52 +01:00
parent 6ad43575ff
commit 2fd22c1850
12 changed files with 417 additions and 70 deletions

View file

@ -7,6 +7,8 @@ uniform highp vec3 cameraOffset;
uniform float animationTimer;
varying vec3 vNormal;
varying vec3 vTangent;
varying vec3 vBinormal;
varying vec3 vPosition;
// World position in the visible world (i.e. relative to the cameraOffset.)
// This can be used for many shader effects without loss of precision.
@ -209,6 +211,8 @@ void main(void)
normalPass = normalize((inVertexNormal+1)/2);
#endif
vNormal = inVertexNormal;
vTangent = inVertexTangent.xyz;
vBinormal = inVertexBinormal.xyz;
// Calculate color.
vec4 color = inVertexColor;