diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-08-12 19:13:32 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-08-12 19:13:32 -0700 |
| commit | 19e3a0f319fd04c1dde803796ec272d038b634f7 (patch) | |
| tree | 502077d3e1dab810f037faea810f1cfd2c5ec691 /shaders | |
| parent | 87f60b880bd1ce586972f9b70dd6c627b1df92cd (diff) | |
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
Diffstat (limited to 'shaders')
| -rw-r--r-- | shaders/shader.frag | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |