From 74e8d3f0278a65fdf86a1185fec8a6016e628e88 Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 19 Jan 2025 21:04:51 +1100 Subject: render UI in software --- intermediate/ui.glsl | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'intermediate/ui.glsl') diff --git a/intermediate/ui.glsl b/intermediate/ui.glsl index 095d4df..7dd361d 100644 --- a/intermediate/ui.glsl +++ b/intermediate/ui.glsl @@ -13,28 +13,11 @@ type: vec2 [attribute] name: uv type: vec2 -[attribute] -name: colour -type: vec4 -[interpolator] -name: colour -type: vec4 [interpolator] name: uv type: vec2 -[struct] -name: Config -[variable] -name: projection -type: mat4 - -[cbuffer] -name: config_buffer -type: Config -stage: vertex - [texture] name: atlas stage: fragment @@ -49,9 +32,8 @@ type: vec4 #ifdef VERTEX_SHADER void main() { - interpolator.colour = colour; interpolator.uv = uv; - gl_Position = config_buffer.projection * vec4(position, 0.0, 1.0); + gl_Position = vec4(position, 1.0, 1.0); } #endif @@ -59,8 +41,7 @@ void main() { #ifdef FRAGMENT_SHADER void main() { - vec4 c = texture(atlas, interpolator.uv).r.xxxx; - c *= interpolator.colour; + vec4 c = texture(atlas, interpolator.uv).rgba; colour = c; } -- cgit v1.2.3-54-g00ecf