summary refs log tree commit diff
path: root/shaders/shader.frag
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-08-17 01:41:16 -0700
committerIrene Knapp <ireneista@irenes.space>2026-08-17 02:07:34 -0700
commitb52d1be4302e452a45a03595f8c70411a061f920 (patch)
tree27af0086f681df583389cfadafd65d7067d26fb2 /shaders/shader.frag
parentdb64249ce8108439ada78a2d23d67d2c573a1688 (diff)
move the texture binding to a push descriptor
with a descriptor update template, even

yay

this also moves us to a minimum Vulkan version of 1.4, which we understand to be widely deployed. in theory, push descriptors and update templates were available via extensions in earlier versions, but it doesn't seem worth doing the work to switch out whether we use the extensions based on the version, so we don't.

Force-Push: yes
Change-Id: I26db8771abf5626d9614630c66e019ea99babcac
Diffstat (limited to 'shaders/shader.frag')
-rw-r--r--shaders/shader.frag7
1 files changed, 5 insertions, 2 deletions
diff --git a/shaders/shader.frag b/shaders/shader.frag
index a2561d1..90d6ab0 100644
--- a/shaders/shader.frag
+++ b/shaders/shader.frag
@@ -1,7 +1,10 @@
 #version 460
 
-layout(binding = 1) uniform sampler textureSampler;
-layout(binding = 2) uniform texture2D textureImage;
+//   Set 0 is the default, so we could omit it, but we prefer to be explicit.
+// It specifies which the descriptor set layout the binding index pertains to;
+// see init_pipeline() in render.rs.
+layout(set = 0, binding = 1) uniform sampler textureSampler;
+layout(set = 1, binding = 0) uniform texture2D textureImage;
 
 layout(location = 0) in vec3 fragmentColor;
 layout(location = 1) in vec2 fragmentTextureCoordinate;