From e8c93463b2ae5114f0c88e768e5625abac9d5a50 Mon Sep 17 00:00:00 2001 From: quou Date: Fri, 27 Dec 2024 12:04:51 +1100 Subject: 3D maths --- intermediate/ui.glsl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'intermediate/ui.glsl') diff --git a/intermediate/ui.glsl b/intermediate/ui.glsl index e40d3d5..095d4df 100644 --- a/intermediate/ui.glsl +++ b/intermediate/ui.glsl @@ -24,6 +24,17 @@ type: vec4 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 @@ -40,7 +51,7 @@ type: vec4 void main() { interpolator.colour = colour; interpolator.uv = uv; - gl_Position = vec4(position, 0.0, 1.0); + gl_Position = config_buffer.projection * vec4(position, 0.0, 1.0); } #endif -- cgit v1.2.3-54-g00ecf