summaryrefslogtreecommitdiff
path: root/intermediate
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-27 12:04:51 +1100
committerquou <quou@disroot.org>2024-12-27 12:04:51 +1100
commite8c93463b2ae5114f0c88e768e5625abac9d5a50 (patch)
tree3fc7b774eb9bf172fbcb95bb3a410093a5b5b856 /intermediate
parent0d2179f6beb7e11632b76dac0615e593cafaaf00 (diff)
3D maths
Diffstat (limited to 'intermediate')
-rw-r--r--intermediate/ui.glsl13
1 files changed, 12 insertions, 1 deletions
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