cemu-project / Cemu

Cemu - Wii U emulator
https://cemu.info
Mozilla Public License 2.0
7.26k stars 596 forks source link

The Wind Waker HD - Lens flare not rendering #407

Open MarkoG21 opened 1 year ago

MarkoG21 commented 1 year ago

Cemu Version: 8f674933d2b507ce91c17b69fef2c38c6f1fbcaf Tested with latest Stable Build (1.26.2f) aswell as latest experimental Build Tested Vulkan and OpenGL Graphics API, Error present in all cases.

When playing The Wind Waker HD, things like the lens flare are not being rendered like they are on console. I have provided a screenshot to showcase the problem. To reproduce: Start the Game, either wait for the main screen to see the missing lens flare, or while ingame, look into the sun in 1st person view. Tested on: I7 8700k R9 290, aswell as on the Steam Deck.

comparison

log.txt

Exzap commented 1 year ago

The lens flare effect relies on raw framebuffer access by the CPU which is notoriously expensive to emulate. Cemu has code for this already but it is disabled because it ruins the performance (think 5-10 times slower, see this video I recorded while testing the implementation over a year ago). I'm not sure if there is a way to accurately emulate this without a major impact on FPS, but there may be more cheaty ways that would be less expensive.

Twilight Princess HD has a similar issue with the lens flare and with the aiming reticle being offset.

Gabezin64 commented 1 year ago

I would also like to see this issue fixed, just missing this effect for these 2 games (WW and TP) to run perfectly. I just don't understand how this effect is emulated in Dolphin, if they are basically the same games... But it would be cool to see this effect on Cemu, even if it was through some graphic pack.

Eduxki commented 1 year ago

That's the way an Emulator should be developed, cheaty way, who cares about accuracy. I guess the other big brother Zelda game Exzap forgot to mention has non emulated effects too. Where are my 4 thumbs up ? ;)

Masamune3210 commented 1 year ago

I'm not entirely sure what your point is. You want to find a way to fix it without hacky methods that doesn't positively kill the performance, be our guest. Until then, should probably tone down the snark a bit

Eduxki commented 1 year ago

You know my point, it's obvious, but don't take it too serious, I always talk like this, so thank for your tip but I'll keep my tone, I can't help it. Peace

Gabezin64 commented 1 year ago

I don't understand how this raw framebuffer access works, but I believe there is some way (not yet discovered) to emulate this effect without losing fps, because heavier games like BoTW have it perfect.

I remember that they said that this problem was related to the picto box bug, and this one was solved some time ago, but the lens flare one continues...

Unfortunately, I don't understand programming, otherwise I would try to find a way to solve this, or create a graphic pack (which I also don't know how to do) because I would really like to see these 2 Zelda games with this effect emulated correctly.

I know it's a small thing, but it's something that bothers me, and playing on PC at higher resolutions is definitely better than on console.

AK3030 commented 1 year ago

The lens flare effect relies on raw framebuffer access by the CPU which is notoriously expensive to emulate. Cemu has code for this already but it is disabled because it ruins the performance (think 5-10 times slower, see this video I recorded while testing the implementation over a year ago). I'm not sure if there is a way to accurately emulate this without a major impact on FPS, but there may be more cheaty ways that would be less expensive.

Twilight Princess HD has a similar issue with the lens flare and with the aiming reticle being offset.

How do I go about enabling this if I want to test it myself?

Exzap commented 1 year ago

How do I go about enabling this if I want to test it myself?

It's not exposed as an option and requires editing the code and compiling a custom build. I don't think it's worth it unless you want to actively work on fixing this issue.

Shadorino commented 1 year ago

Bumping this. Would the performance reach a stable 30 fps with current high end hardware? There's got to be a way to do this inexpensively with a graphics pack though.

Eduxki commented 1 year ago

Bumping this. Would the performance reach a stable 30 fps with current high end hardware? There's got to be a way to do this inexpensively with a graphics pack though.

ain't about that, the guy said he could emulate the effect but with very bad performance, but that doesn't mean it can't be done in other way. By debugging and trying to find what it is failing, maybe it requires to change a lot of code as the guy said but ain't about that to develop an emulator? being accurate and functional? .. also it may be something that just affects this game or something that affects a lot of games with effects not being emulated. Who knows, I'm not a developer, wish I could help. It's like ths picto box bug, it was not corrected ages till someone made a hack so all pictures were accepted, cool, then someone found what was wrong and now it is well emulated. This emulator has been always about being able to play BotW and other games were just a plus. But it still got exclusive games such as this one, that's better than dolphin because it doesn't require the gameboy advance and it's got QoL things that make it the definitive version of the game. Same with the other zelda HD.... BoTW now can be emulated using a Switch emulator, it's not an exclusive game, so I find the other 2 Zeldas that still are best versions more important than BoTW ^^. But that's my way of thinking what I find an emulator good for. If the game is ported to PC then obviously I play the best version.

Exzap commented 1 year ago

Would the performance reach a stable 30 fps with current high end hardware? There's got to be a way to do this inexpensively with a graphics pack though.

Not even 10 FPS is doable with the current solution. And yes, in theory it could be done with a graphic packs patch. But that doesn't make it any easier because then it requires rewriting how the game checks for depth occlusion and that's not exactly a trivial task.

@Eduxki Please don't respond on behalf of the devs. Especially not with mostly incorrect off-topic rambling.

Shadorino commented 1 year ago

I see. Thank you for the explanation Exzap. One day maybe :)