diff options
Diffstat (limited to 'stockton-render/src/draw/data/stockton.frag')
-rw-r--r-- | stockton-render/src/draw/data/stockton.frag | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/stockton-render/src/draw/data/stockton.frag b/stockton-render/src/draw/data/stockton.frag index 09ff8a7..b558335 100644 --- a/stockton-render/src/draw/data/stockton.frag +++ b/stockton-render/src/draw/data/stockton.frag @@ -1,19 +1,16 @@ #version 450 -layout(set = 0, binding = 0) uniform texture2D tex[2]; -layout(set = 0, binding = 1) uniform sampler samp[2]; +// DescriptorSet 0 = Matrices +// DescriptorSet 1 = Textures +layout(set = 1, binding = 0) uniform texture2D tex[2]; +layout(set = 1, binding = 1) uniform sampler samp[2]; -layout (location = 1) in vec3 frag_color; -layout (location = 2) in vec2 frag_uv; -layout (location = 3) in flat int frag_tex; +layout (location = 1) in vec2 frag_uv; +layout (location = 2) in flat int frag_tex; layout (location = 0) out vec4 color; void main() { - if(frag_tex == -1) { - color = vec4(frag_color, 1.0); - } else { - color = texture(sampler2D(tex[frag_tex], samp[frag_tex]), frag_uv); - } + color = texture(sampler2D(tex[frag_tex], samp[frag_tex]), frag_uv); }
\ No newline at end of file |