From 07984221e88c40d54e66efbb89afd1fa520a6f06 Mon Sep 17 00:00:00 2001 From: Sean Maas Date: Sat, 14 May 2022 12:15:08 -0400 Subject: [PATCH] Fix fog being applied to coins --- src/nds/nds_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nds/nds_renderer.c b/src/nds/nds_renderer.c index 01a1a01d..5d05ce32 100644 --- a/src/nds/nds_renderer.c +++ b/src/nds/nds_renderer.c @@ -270,9 +270,9 @@ static void draw_vertices(const Vtx_t **v, int count) { } if (geometry_mode & G_ZBUFFER) { - // Apply fog to polygons with it enabled, and IA textures because they look bad otherwise + // Apply fog to polygons with it enabled, and some IA textures that look bad otherwise int fmt = poly_fmt | POLY_ALPHA(alpha) | POLY_ID(polygon_id); - if ((geometry_mode & G_FOG) || ((glGetTexParameter() >> 26) & 0x7) == GL_RGB8_A5) + if ((geometry_mode & G_FOG) || (((glGetTexParameter() >> 26) & 0x7) == GL_RGB8_A5 && alpha < 31)) fmt |= POLY_FOG; // Apply the polygon attributes