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:
parent
6ad43575ff
commit
2fd22c1850
12 changed files with 417 additions and 70 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue