diff --git a/shaders/ui-text.comp.glsl b/shaders/ui-text.comp.glsl index c940035..88a0b9d 100644 --- a/shaders/ui-text.comp.glsl +++ b/shaders/ui-text.comp.glsl @@ -36,9 +36,12 @@ void main() { vec2 t = (sp - it.rect.xy) / it.rect.zw; vec2 uv = mix(it.uv.xy, it.uv.zw, t); + // Font slots are push constants — provably dynamically uniform, so no + // nonuniformEXT: lets the compiler hoist the descriptor load out of the + // per-pixel glyph loop and avoid the divergent-descriptor path. float sdf = texture( - sampler2D(uiTextures[nonuniformEXT(pc.fontTextureSlot)], - uiSamplers[nonuniformEXT(pc.fontSamplerSlot)]), + sampler2D(uiTextures[pc.fontTextureSlot], + uiSamplers[pc.fontSamplerSlot]), uv ).r;