diff options
Diffstat (limited to 'shaders/shader.frag')
| -rw-r--r-- | shaders/shader.frag | 7 |
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; |