From 19e3a0f319fd04c1dde803796ec272d038b634f7 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Wed, 12 Aug 2026 19:13:32 -0700 Subject: split the texture's sampler and its image view into separaet bindings this will make it easier to change the image view dynamically as a push update, in a future CL Force-Push: yes Change-Id: If7cfab07913a5a462e16dd7fb478ed491d33d4d9 --- shaders/shader.frag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shaders') diff --git a/shaders/shader.frag b/shaders/shader.frag index 20550ba..a2561d1 100644 --- a/shaders/shader.frag +++ b/shaders/shader.frag @@ -1,6 +1,7 @@ #version 460 -layout(binding = 1) uniform sampler2D textureSampler; +layout(binding = 1) uniform sampler textureSampler; +layout(binding = 2) uniform texture2D textureImage; layout(location = 0) in vec3 fragmentColor; layout(location = 1) in vec2 fragmentTextureCoordinate; @@ -9,7 +10,7 @@ layout(location = 0) out vec4 outColor; void main() { outColor = vec4(fragmentColor - * texture(textureSampler, + * texture(sampler2D(textureImage, textureSampler), fragmentTextureCoordinate).rgb, 1.0); } -- cgit 1.4.1