diff options
Diffstat (limited to 'shaders/tile-shader.frag')
-rw-r--r-- | shaders/tile-shader.frag | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/shaders/tile-shader.frag b/shaders/tile-shader.frag index 8a31a1e1..0f487386 100644 --- a/shaders/tile-shader.frag +++ b/shaders/tile-shader.frag @@ -1,14 +1,12 @@ -#version 450 precision highp float; -const int MAX_SAMPLERS = 16; -layout (location = 0) uniform sampler2D samplers[MAX_SAMPLERS]; +uniform sampler2D samplers[32]; -layout (location = 0) in vec2 texcoord; -layout (location = 1) flat in uint sampler_id; +in vec2 out_texcoords; +flat in uint frag_sampler_id; out vec4 fragmentColor; void main() { - fragmentColor.rgb = texture(samplers[sampler_id], texcoord).rgb; + fragmentColor.rgb = texture(samplers[frag_sampler_id], out_texcoords).rgb; fragmentColor.a = 1; } |