stk-code_catmod/data/shaders/utils/sp_texture_sampling.frag
Benau 24308ced03 Remove features in SP that give no performance boost at all
gl_Layer in vertex shader, bindless and array textures
2018-01-13 14:49:33 +08:00

38 lines
697 B
GLSL

// Wrapper to allow easy sampling for material texture slots
uniform sampler2D tex_layer_0;
uniform sampler2D tex_layer_1;
uniform sampler2D tex_layer_2;
uniform sampler2D tex_layer_3;
uniform sampler2D tex_layer_4;
uniform sampler2D tex_layer_5;
vec4 sampleTextureSlot0(vec2 uv)
{
return texture(tex_layer_0, uv);
}
vec4 sampleTextureSlot1(vec2 uv)
{
return texture(tex_layer_1, uv);
}
vec4 sampleTextureSlot2(vec2 uv)
{
return texture(tex_layer_2, uv);
}
vec4 sampleTextureSlot3(vec2 uv)
{
return texture(tex_layer_3, uv);
}
vec4 sampleTextureSlot4(vec2 uv)
{
return texture(tex_layer_4, uv);
}
vec4 sampleTextureSlot5(vec2 uv)
{
return texture(tex_layer_5, uv);
}