summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/shaders/2d_texcoord.fsh5
-rw-r--r--assets/shaders/3d.fsh5
2 files changed, 4 insertions, 6 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
+}
diff --git a/assets/shaders/3d.fsh b/assets/shaders/3d.fsh
index 7660204..276f305 100644
--- a/assets/shaders/3d.fsh
+++ b/assets/shaders/3d.fsh
@@ -11,9 +11,8 @@ flat in uint g_sampler;
void main() {
vec4 color = g_color;
if( g_sampler != SAMPLER_ID_NONE ) {
- // Always use sampler 0 for fonts
- color = texture2D( g_samplers[0], g_texcoord );
+ color = texture2D( g_samplers[g_sampler], g_texcoord );
color *= g_color;
}
gl_FragColor = color;
-} \ No newline at end of file
+}