port: detect fog color usage

This commit is contained in:
fgsfds 2023-08-03 16:50:24 +02:00
parent ff9030f5fb
commit 406900e253
1 changed files with 2 additions and 1 deletions

View File

@ -1114,7 +1114,8 @@ static void gfx_sp_vertex(size_t n_vertices, size_t dest_index, const Vtx* verti
d->z = z;
d->w = w;
if (rsp.geometry_mode & G_FOG) {
// seems like PD uses the fog color without setting G_FOG sometimes
if ((rsp.geometry_mode & G_FOG) || (rdp.other_mode_l >> 30) == G_BL_CLR_FOG) {
if (fabsf(w) < 0.001f) {
// To avoid division by zero
w = 0.001f;