diff options
Diffstat (limited to '')
-rwxr-xr-x | res/shaders/simple_shader.frag | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/shaders/simple_shader.frag b/res/shaders/simple_shader.frag index 102ac22..f3e629b 100755 --- a/res/shaders/simple_shader.frag +++ b/res/shaders/simple_shader.frag @@ -2,7 +2,7 @@ layout (location = 0) in vec3 fragColor; layout (location = 1) in vec2 fragUv; -layout (location = 2) in float fragTex; +layout (location = 2) in flat int fragTex; layout (location = 0) out vec4 outColor; @@ -11,7 +11,7 @@ layout (binding = 0) uniform GlobalUbo { vec3 directionToLight; } ubo; -layout (binding = 1) uniform sampler2D texSampler[2]; +layout (binding = 1) uniform sampler2D texSampler[3]; layout(push_constant) uniform Push { mat4 transform; @@ -19,5 +19,5 @@ layout(push_constant) uniform Push { } push; void main() { - outColor = mix(texture(texSampler[int(fragTex)], fragUv), vec4(fragColor, 1.0), .1); + outColor = mix(texture(texSampler[fragTex], fragUv), vec4(fragColor, 1.0), .1); }
\ No newline at end of file |