mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-10 20:05:26 +01:00
Support array textures in shadow renderer (the lazy way)
This commit is contained in:
@@ -6,11 +6,8 @@ uniform float xyPerspectiveBias0;
|
||||
uniform float xyPerspectiveBias1;
|
||||
uniform float zPerspectiveBias;
|
||||
|
||||
#ifdef GL_ES
|
||||
varying mediump vec2 varTexCoord;
|
||||
#else
|
||||
centroid varying vec2 varTexCoord;
|
||||
#endif
|
||||
CENTROID_ VARYING_ mediump vec2 varTexCoord;
|
||||
CENTROID_ VARYING_ float varTexLayer; // actually int
|
||||
|
||||
vec4 getRelativePosition(in vec4 position)
|
||||
{
|
||||
@@ -45,5 +42,9 @@ void main()
|
||||
tPos = applyPerspectiveDistortion(pos);
|
||||
|
||||
gl_Position = vec4(tPos.xyz, 1.0);
|
||||
varTexCoord = (mTexture * vec4(inTexCoord0.xy, 0.0, 1.0)).xy;
|
||||
|
||||
varTexCoord = (mTexture * vec4(inTexCoord0.xy, 1.0, 1.0)).st;
|
||||
#ifdef USE_ARRAY_TEXTURE
|
||||
varTexLayer = inVertexAux;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user