diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-02 00:36:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-02 00:36:34 +0200 |
commit | 742579ca2fce1effe942928f5b94401e1e723f34 (patch) | |
tree | ba11651aecd68edc12d3f5c69c04b6c2f6c2ee79 /shaders/tile-shader.frag | |
parent | 3dc6362599e85c9978ec4e9676ebcda3ab52beaf (diff) |
foo
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; } |