Emulator Issues #5999
closedZelda Games Lens Flare depth emulation Issues on D3D11
0%
Description
The Legends of Zelda: Twilight Princess (GC) - GZ2E01
While in recent revisions, the lens flare works in D3D9 and OpenGL without issues (previously, I remember it sometimes not working after so long) I noticed an issue when testing D3D11 that made me want to check out the game in more depth. Apparently, for some reason you can trigger the lens flare and darkening of the screen by looking at the sun, no matter where it is. Where as in the other back-ends it works fine.
To reproduce the problem, simply start a new game, and when you take control of link, walk through the south exit of the map. The guy will yell at you and force you to come back a bit. Then, C-up and go into first person and turn to your left (so you're facing the left of the map) and look at the big tree. On OpenGL and D3D9, you'll just see a tree. But in D3D11, depending on your angle a varying amount of the lens flare will kick in. This effect can be very distracting at sunrise and sundown when the sun is hidden behind objects.
I used 3.5-392 and 3.5-395(1c64b1993de02405e563c5fa13d5b4cb7818c520) for a majority of my testing, both 32bit and 64bit (for some reason I thought OpenGL was broken in 64bit, but ended up just having a setting wrong.)
As a work around, you can turn off the effect (presumably with more side-effects though...) by turning on skip efb access from CPU temporarily if the effect is causing visibility issues. Through thorough testing, the problem seems to go back all the way past version 3.0.
My CPU is core i5 760 @ 3.8 GHz with a GTX 470. Was confirmed on another computer over IRC, though, and on a Radeon card, so it's not a driver issue.
Now, one last thing, on Software rendering everything works fine except the screen seems to be distorted with black bars. Originally I thought that the effect wasn't rendering in software mode, but it turns out that it just takes a couple frames to draw, which is a long time in software rendering!
Any other relevant information or links to logs:
Darkness Effect in D3D11 - http://i.imgur.com/wCohQ2N.png
Confirmed on 2nd Computer by big tree - http://i.imgur.com/5TxIZZN.png
Looking in the same spot in OpenGL - http://i.imgur.com/Gk4jzX6.jpg
Black Bars in Software Rendering - http://i.imgur.com/LQxo3jE.png
I do have fifo logs of each area, but, I find that using them simply doesn't work. Sometimes, even though the effect works in game, it won't show up in the log, or, in DX11's case, it'll work properly if you load from a fifo log. I'm pretty sure using the fifo logs at first confused me and made making this issue a lot harder to pinpoint.
Updated by JMC4789 almost 12 years ago
Apparently the issue is exactly the same in the Wii Version as well. For some reason, I didn't think of testing it until after I made the issue report.
Updated by rachelbryk almost 12 years ago
- Status changed from New to Accepted
- Issue type set to Bug
- Category set to gfx
- Operating system Windows added
Updated by Armada over 11 years ago
My fifo log seems to work. Recorded at 1xIR with EFB to texture and scaled EFB copy.
Skipping EFB access from CPU will hide the flare completely.
Updated by Armada over 11 years ago
It seems the flare bug is also visible in DX9, but it quickly hides itself after a few frames - http://i.imgur.com/39U8VCP.png
Here are two fifo logs one for each renderer of the exact same 5 frames loaded from a save state: http://www.mediafire.com/?n7w7l4h3ya21n8w
You can see that in the DX9 renderer the flare quickly fades while in the DX11 renderer the flare stays.
Updated by Armada over 11 years ago
It seems that the reason the flare is visible in the DX9 renderer is because I loaded it from a save state made with the DX11 renderer. The fifo logs may still be interesting though.
Updated by Autoran1 over 11 years ago
I think is smth wrong was in DX11 from the start, i tested this issue and it was with DX11 from the very beginning of the plugin, btw the issue with hand figure before flashlight in Silent Hill is also was here forever as well as this one.
Updated by JMC4789 almost 11 years ago
- Status changed from Accepted to Fixed
This is currently fixed in Master. I do not know exactly when it was fixed. Maybe by a D3D update even?
Either way, I've been testing this for a while and I can no longer cause it to happen. I wish I understood why it stopped happening though.
Updated by JMC4789 almost 11 years ago
- Status changed from Fixed to Accepted
It has morphed itself into something different. It still happens, but only when it feels like it. First person mode seems to work fine. Maybe it's some kind of projection hack issue?
Updated by JMC4789 almost 11 years ago
Apparently Skip EFB Access to CPU mitigates the problem by disabling the lens flare. I guess this is a clue as to what D3D needs to fix?
Updated by Armada almost 11 years ago
I already mentioned that in the comments above.
Updated by JMC4789 almost 11 years ago
I'm slow :P. Either way, the thing that bothered me is that it was happening sporadically in D3D(11) now rather than 100% of the time. I'm not sure if it was always like that or if this is something new.
Updated by Armada almost 11 years ago
I used to reproduce the bug in first person mode and it only happened when looking directly at the sun. I was able to reproduce it in the starting area 100% of the time.
Updated by Autoran1 over 10 years ago
Tested this issue, the thing was broken long time ago in r6751 of SVN- rd435fd89
just reverted PixelShaderCache.cpp code in DX11, and everything seems to work fine even with recent code
Here's the right position of the sun on recent build
http://i.minus.com/iqt0Hy5Jb0bby.jpg
But since revert it not right, i'm expecting correct bugfix
Updated by JMC4789 over 10 years ago
No, issue 7033 only happens on certain graphics cards, this issue happens on all graphics cards.
Updated by JMC4789 over 10 years ago
Lol, I actually think this is related to the mirrors being misaligned in Luigi's Mansion under D3D more than anything.
Updated by Autoran1 over 10 years ago
Issue 7033 has been merged into this issue.
Updated by Autoran1 over 10 years ago
Yup ZWW is absolutely here, and suffers from this too, how can i reproduce Luigi mansion issue
Besides i think there are still few old D3D11 issues on this tracker which could be fixed by this, well except Silent Hill Shattered Memories, i tried this one, unfortunately there is smth else
Updated by Autoran1 over 10 years ago
Tested Luigi's mansion mirror, still broken, nothing to do with this
Updated by JMC4789 over 10 years ago
But... this is still broken too?
And I don't think the Wind Waker one is related to the Twilight Princess one because different hardware is affected. I disagree with merging 7033 into this.
Updated by JMC4789 over 10 years ago
- Status changed from Accepted to Fixed
Fixed by 4.0-1487 - https://dolphin-emu.org/download/dev/a40ea4e26ace3a56c6bcc2f4dc2b075a3ecf0ae0/