diff options
| author | aura <nw@moneybot.cc> | 2026-03-10 01:35:50 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-03-10 01:35:50 +0100 |
| commit | 8329d42d3e592f4cd42cdfa586e2325ddc76c898 (patch) | |
| tree | dec7e2a733bfc6b6384936c1f3ed067a42b59bb9 /assets/shaders/2d.vsh | |
| parent | 8ae8c85e9d3806cdb726e07f37e1b49484c5c48e (diff) | |
perf profiler, simplify 2d render, string struct, many small things
Diffstat (limited to 'assets/shaders/2d.vsh')
| -rw-r--r-- | assets/shaders/2d.vsh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/assets/shaders/2d.vsh b/assets/shaders/2d.vsh index 7701087..96370fc 100644 --- a/assets/shaders/2d.vsh +++ b/assets/shaders/2d.vsh @@ -1,11 +1,13 @@ #version 150 -in vec2 in_pos; -in vec2 in_texcoord; -in vec4 in_col; +in vec2 in_pos; +in vec4 in_clr; +in vec2 in_texcoord; +in float in_sampler; out vec2 g_texcoord; out vec4 g_color; +flat out uint g_sampler; uniform vec4 g_screenratio; @@ -17,7 +19,8 @@ void main() { pos[1] -= halfscreen[1]; pos[1] *= -1.0; - gl_Position = ( pos ) * g_screenratio; - g_texcoord = in_texcoord; - g_color = in_col; + g_texcoord = in_texcoord; + g_color = in_clr; + g_sampler = uint(in_sampler * 255.0 + 0.5); + gl_Position = ( pos ) * g_screenratio; } |
