summaryrefslogtreecommitdiff
path: root/assets/shaders/2d_texcoord.fsh
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-09-10 12:25:00 +0200
committernavewindre <boneyaard@gmail.com>2025-09-10 12:25:00 +0200
commit235926dadb686589f0b5480162c3ab929159e570 (patch)
tree9fc482720a2bafabaca207befbc611d373d1c7ca /assets/shaders/2d_texcoord.fsh
parent8be4ca70798fafd57dba947edfb18d0de594013d (diff)
unfuck
Diffstat (limited to 'assets/shaders/2d_texcoord.fsh')
-rw-r--r--assets/shaders/2d_texcoord.fsh5
1 files changed, 2 insertions, 3 deletions
diff --git a/assets/shaders/2d_texcoord.fsh b/assets/shaders/2d_texcoord.fsh
index cf94a68..cbb9be0 100644
--- a/assets/shaders/2d_texcoord.fsh
+++ b/assets/shaders/2d_texcoord.fsh
@@ -11,10 +11,9 @@ flat in int g_sampler;
void main() {
vec4 color = g_color;
if( g_sampler != SAMPLER_ID_NONE ) {
- // Always use sampler 0 to avoid dynamic indexing issues
- vec4 tex_color = texture2D( g_samplers[0], g_texcoord );
+ vec4 tex_color = texture2D( g_samplers[g_sampler], g_texcoord );
color.a = g_color.a * tex_color.a;
if (color.a < 0.01) discard;
}
gl_FragColor = color;
-} \ No newline at end of file
+}