47 lines
1.1 KiB
GLSL
47 lines
1.1 KiB
GLSL
|
|
layout(location = 0) in vec4 vTexCoord;
|
|
layout(location = 1) in vec4 vColor;
|
|
layout(location = 9) in vec3 vLightmap;
|
|
|
|
#ifndef SIMPLE
|
|
layout(location = 2) in vec4 pixelpos;
|
|
layout(location = 3) in vec3 glowdist;
|
|
layout(location = 4) in vec3 gradientdist;
|
|
layout(location = 5) in vec4 vWorldNormal;
|
|
layout(location = 6) in vec4 vEyeNormal;
|
|
#endif
|
|
|
|
#ifdef NO_CLIPDISTANCE_SUPPORT
|
|
layout(location = 7) in vec4 ClipDistanceA;
|
|
layout(location = 8) in vec4 ClipDistanceB;
|
|
#endif
|
|
|
|
#if defined(USE_LEVELMESH)
|
|
layout(location = 10) in flat int uDataIndex;
|
|
#endif
|
|
|
|
layout(location=0) out vec4 FragColor;
|
|
#ifdef GBUFFER_PASS
|
|
layout(location=1) out vec4 FragFog;
|
|
layout(location=2) out vec4 FragNormal;
|
|
#endif
|
|
|
|
vec4 texture(int index, vec2 p)
|
|
{
|
|
return texture(textures[uTextureIndex + index], p);
|
|
}
|
|
|
|
ivec2 textureSize(int index, int lod)
|
|
{
|
|
return textureSize(textures[uTextureIndex + index], lod);
|
|
}
|
|
|
|
vec4 textureGrad(int index, vec2 P, vec2 dPdx, vec2 dPdy)
|
|
{
|
|
return textureGrad(textures[uTextureIndex + index], P, dPdx, dPdy);
|
|
}
|
|
|
|
vec4 texelFetch(int index, ivec2 P, int lod)
|
|
{
|
|
return texelFetch(textures[uTextureIndex + index], P, lod);
|
|
}
|