Emulator Issues #4922

TMNT: Fog is not rendered properly in all scenes leading to unplayable sections

Added by wespipes69 over 10 years ago. Updated about 4 years ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


1) Game Name and ID (as it appears in right click > properties: "GZ2P01",
"RSBE01", etc):

2) What is the expected output? What do you see instead?
Correct and consistant fog emulation. On some levels it's fine (rendered properly) but on other levels it makes the game unplayable.

3) Did the game ever work correctly (i.e. not have this problem) on an
earlier version of dolphin? Please specify the exact revision when the
problem began.
Probably always been an issue.

4) What steps will reproduce the problem?
1. Launch game with fog enabled
2. Observe title screen gfx (some buildings are solid green)
3. Also, attempt to play level 6

5) What version of dolphin are you using (32bit/64bit along with the
version as it appears in the title bar: "R 4779", "R 6403M", "3.0", etc)?
On what operating system, drivers, and hardware? Be sure to list OS,
graphics driver information, and video card model if you are having
graphics problems, for example.
Dolphin 3.0 159, Win 7 x64, GF460gt w/latest drivers.


GYRE41.dff (4.58 MB) GYRE41.dff seapancake, 06/23/2016 03:13 PM
GYRE41-4.png (320 KB) GYRE41-4.png Level 6 is unplayable seapancake, 06/23/2016 03:13 PM
GYRE41-1.png (1.86 MB) GYRE41-1.png Fog around the temple is fine seapancake, 06/23/2016 03:13 PM


#2 Updated by tommyhl2.SS about 10 years ago

List the full name of the Turtle game, it's not just TMNT.

#3 Updated by parlane about 10 years ago

And attach a dff please.

#4 Updated by wespipes69 about 10 years ago

What are you talking about? It's TMNT everywhere that I see. That's the full name of the must be thinking of something else. What do you think it is?

Here's ya go!

#5 Updated by tommyhl2.SS about 10 years ago

Confusion is that this is my TMNT game which is not your TMNT game. The game ID should be enough but next time just add some more info if possible. There are like 10 TMNT games. :p

#8 Updated by NeoBrainX almost 10 years ago

Download link broken, please upload the dff file somewhere else where it doesn't get deleted after less than 3 months..

#9 Updated by wespipes69 almost 10 years ago

It's actual still there - you have to copy/paste the link into address bar. Doesn't work for some reason just clicking on it.

Anyway, I also put it on Mediafire here:

#10 Updated by NeoBrainX almost 10 years ago

  • Status changed from New to Work started

Most likely due to wrong magic numbers in fog calculation.
This game uses exp2-distributed fog intensity, so scaling the exponent by 8.f instead of e.g. 1.f is very noticeable. Using 1.f instead makes the fog look less extreme.

Guess I'll have to carry out some tests on real hw to find the optimal value.

#11 Updated by Billiard26 over 9 years ago

  • Issue type set to Bug
  • Category set to gfx

#12 Updated by NeoBrainX over 9 years ago

For reference, my previous comment was likely wrong. the scaling exponent does seem to be fine.

#14 Updated by NeoBrainX almost 9 years ago

  • Status changed from Work started to Accepted
  • Category changed from gfx to ppc

Likely not a GPU emulation bug.

The fog parameters are "infinity" and native dff player shows a similar issue.

#15 Updated by NeoBrainX over 8 years ago

Please provide a save file for the game and steps to reproduce the issue with minimal effort and without assuming I've ever seen the game in action. I'm running the game at 10 FPS and really don't want to play through the first few levels just to see I've done something incorrectly.

#16 Updated by wespipes69 over 8 years ago!356

Simply load up on save on this GC mem card, and select level 6.

#17 Updated by NeoBrainX over 8 years ago

Reproduced the issue, happens even in Interpreter mode. Still not quite sure what to do about this :|

#18 Updated by wespipes69 over 8 years ago

Wonder why disabling fog fixes it...

#19 Updated by NeoBrainX over 8 years ago

The fog values are invalid. The fog strength is set to infinity, so it's no surprise that you can't see anything but green :p

#20 Updated by NeoBrainX over 8 years ago

Revision c02ca4f1ece1 in the ppc_fp branch (non-IEEE mode emulation) seems to fix this issue. It seems like the branch also makes the game reboot when trying to load the memory card, but you still use state saves to get ingame and it'll render fine.

#21 Updated by flacs over 8 years ago

  • Status changed from Accepted to Fixed
  • Operating system N/A added

The ppc_fp branch was merged into master: b863e40677710f2d53cae8aedfe450b4215562d3.

#22 Updated by flacs about 8 years ago

  • Status changed from Fixed to Accepted

It's still broken in both Interpreter and Jit64 even though Star Fox works correctly now (issue 182).

Workaround: use "JITIL Recompiler"

#23 Updated by JMC4789 over 7 years ago

JITIL isn't a work-around for this any longer, and I can't find a build where it was a work-around.

#25 Updated by ZephyrSurfer over 7 years ago

Can we just clamp the fog to some arbitrary value? Maybe someone could make a hwtest to fix fog issues. Surely any clamped value is better than having full fog.

Is this that what breaks Legacy of Kain as well?

#26 Updated by flacs over 7 years ago

Clamping fog would be a hack and there already is one that just disables fog completely.

#27 Updated by ZephyrSurfer over 7 years ago

It hasn't been fixed since 2011, scratch that It's never worked.

I think clamping makes sense. Some audio issues were fixed by clamping it's volume.
This would be similar in clamping fog volume as it were.

It's got to be an improvement, right? yes

#28 Updated by JMC4789 over 7 years ago

No. Clamping volume was the accurate behavior to console. Clamping fog doen't appear to be accurate at all.

#29 Updated by seapancake almost 6 years ago

  • Tested in 4.0-9503
  • First screenshot is from the first level, fog effects render correctly
  • Loading level 6 from save entire screen is green, the building in the background of title screen has the same issue
  • Occurs in 4.0.2 D3D/OGL and software, tweaked settings but made no difference
  • FIFO log attached

#30 Updated by JMC4789 over 4 years ago

I know it's been a while... but...

Fixed in PR6348 -

#31 Updated by JosJuice over 4 years ago

  • Status changed from Accepted to Fix pending

#33 Updated by JosJuice about 4 years ago

  • Fixed in set to 5.0-6259
  • Status changed from Fix pending to Fixed

Also available in: Atom PDF