From 5ad3b59da4dd837e12966980e5f9b666d3ea9775 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Tue, 11 Jul 2023 00:21:14 -0700 Subject: [PATCH] Tune mipmaps and alpha clip threshold --- main.c | 2 +- threedee.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index cebaf55..b361064 100644 --- a/main.c +++ b/main.c @@ -790,7 +790,7 @@ sg_image load_image(MD_String8 path) .height = png_height, .pixel_format = SG_PIXELFORMAT_RGBA8, .min_filter = SG_FILTER_LINEAR, - .num_mipmaps = 0, + .num_mipmaps = 1, .wrap_u = SG_WRAP_CLAMP_TO_EDGE, .wrap_v = SG_WRAP_CLAMP_TO_EDGE, .mag_filter = SG_FILTER_LINEAR, diff --git a/threedee.glsl b/threedee.glsl index 6169cf8..ee55546 100644 --- a/threedee.glsl +++ b/threedee.glsl @@ -219,7 +219,7 @@ float calculate_shadow_factor(sampler2D shadowMap, vec4 light_space_fragment_pos void main() { vec4 col = texture(tex, uv); - if(col.a < 0.5) + if(col.a < 0.1) { discard; }