summaryrefslogtreecommitdiff
path: root/res/shaders/simple_shader.frag
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2022-09-26 18:03:07 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2022-09-26 18:03:07 -0400
commit873ca38c0dc8966cd54a18dd74d40c709d83eb32 (patch)
tree0d49e34d566d23bb73f534294737e253613a2a01 /res/shaders/simple_shader.frag
parentundo nearest neighbor (diff)
downloadminecraftvulkan-873ca38c0dc8966cd54a18dd74d40c709d83eb32.tar.gz
minecraftvulkan-873ca38c0dc8966cd54a18dd74d40c709d83eb32.tar.bz2
minecraftvulkan-873ca38c0dc8966cd54a18dd74d40c709d83eb32.zip
texture arrays
Diffstat (limited to 'res/shaders/simple_shader.frag')
-rwxr-xr-xres/shaders/simple_shader.frag10
1 files changed, 3 insertions, 7 deletions
diff --git a/res/shaders/simple_shader.frag b/res/shaders/simple_shader.frag
index f3ae526..102ac22 100755
--- a/res/shaders/simple_shader.frag
+++ b/res/shaders/simple_shader.frag
@@ -2,6 +2,7 @@
layout (location = 0) in vec3 fragColor;
layout (location = 1) in vec2 fragUv;
+layout (location = 2) in float fragTex;
layout (location = 0) out vec4 outColor;
@@ -10,12 +11,7 @@ layout (binding = 0) uniform GlobalUbo {
vec3 directionToLight;
} ubo;
-layout (binding = 2) uniform Deez {
- mat4 projectionViewMatrix;
- vec3 directionToLight;
-} deez;
-
-layout (binding = 1) uniform sampler2D texSampler;
+layout (binding = 1) uniform sampler2D texSampler[2];
layout(push_constant) uniform Push {
mat4 transform;
@@ -23,5 +19,5 @@ layout(push_constant) uniform Push {
} push;
void main() {
- outColor = mix(texture(texSampler, fragUv), vec4(fragColor, 1.0), .1);
+ outColor = mix(texture(texSampler[int(fragTex)], fragUv), vec4(fragColor, 1.0), .1);
} \ No newline at end of file