diff options
| author | Kasullian <tomkasull@gmail.com> | 2025-09-09 01:19:12 -0400 |
|---|---|---|
| committer | Kasullian <tomkasull@gmail.com> | 2025-09-09 01:19:12 -0400 |
| commit | 8be4ca70798fafd57dba947edfb18d0de594013d (patch) | |
| tree | 53c849e8df22c4543dc7d4eb64e0d0360342d6e8 /assets/shaders/2d_texcoord.fsh | |
| parent | ba6d14a7737ef7cd02b61586e39ca2162df3018d (diff) | |
fix font rendering
Diffstat (limited to 'assets/shaders/2d_texcoord.fsh')
| -rw-r--r-- | assets/shaders/2d_texcoord.fsh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/assets/shaders/2d_texcoord.fsh b/assets/shaders/2d_texcoord.fsh index fabbb2f..cf94a68 100644 --- a/assets/shaders/2d_texcoord.fsh +++ b/assets/shaders/2d_texcoord.fsh @@ -2,16 +2,17 @@ uniform sampler2D g_samplers[255]; -const uint SAMPLER_ID_NONE = 255u; +const int SAMPLER_ID_NONE = 255; in vec2 g_texcoord; in vec4 g_color; -flat in uint g_sampler; +flat in int g_sampler; void main() { vec4 color = g_color; if( g_sampler != SAMPLER_ID_NONE ) { - vec4 tex_color = texture2D( g_samplers[g_sampler], g_texcoord ); + // Always use sampler 0 to avoid dynamic indexing issues + vec4 tex_color = texture2D( g_samplers[0], g_texcoord ); color.a = g_color.a * tex_color.a; if (color.a < 0.01) discard; } |
