From b3ab5ee043cca68d0955dcfa3b1cc1044dad9a93 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 28 Nov 2023 22:03:15 +0100 Subject: [PATCH] Color math: skip divide only if no layer on main screen --- src/snes/ppu/render.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/snes/ppu/render.rs b/src/snes/ppu/render.rs index 3703bb9..fbf7f4c 100644 --- a/src/snes/ppu/render.rs +++ b/src/snes/ppu/render.rs @@ -370,9 +370,7 @@ where return pixel; } - let div2 = self.cgadsub & (1 << 6) != 0 - && sublayer != LAYER_BACKDROP - && mainlayer != LAYER_BACKDROP; + let div2 = self.cgadsub & (1 << 6) != 0 && sublayer != LAYER_BACKDROP; if self.cgadsub & (1 << 7) == 0 { // Add mode pixel = pixel.cm_add(&subclr, div2);