cemu-project / Cemu

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

Breath of the Wild: camera shadow on Intel #597

Open lisa-wolfgang opened 1 year ago

lisa-wolfgang commented 1 year ago

image

When Breath of the Wild is played using Vulkan on an Intel GPU, a large, rectangular region in front of Link is always rendered with a shadow, even though there is nothing in the game world causing that region to be shadowed. The region extends beyond the edges of the screen horizontally. The region is always aligned with the camera's yaw, and the distance at which it renders seems to be affected by the camera's pitch. When the area that the region covers is already shadowed (e.g. at night) the region doesn't darken the area further.

The only exceptions to this behavior that I have noticed are during cutscenes. In the cutscene where Link paraglides onto Vah Medoh, the box seems to move with him instead of the camera. Strangely, during Revali's "tour" of the Divine Beast where Link is not on-screen, the box moves with the camera again.

The issue occurs on both Windows and Ubuntu. On Windows, the effect is less pronounced, but the same region is definitely still affected.

I have tried disabling all graphics packs, enabling accurate barriers, and enabling the "shadows for Intel GPUs (Vulkan)" graphics pack.

Occurs since at least v1.26.2f and v2.0-22. log.txt

Squall-Leonhart commented 1 year ago

thats up to intel to resolve.

lisa-wolfgang commented 1 year ago

A similar issue occurs with OpenGL on Ubuntu (untested on Windows). The region doesn't extend as far in front of Link, and it only darkens in-world shadows. It's completely invisible on fully lit surfaces.

The log.txt shows an extremely large number of these warnings during shader compilation:

warning: some implementations may not support implicit int -> uint conversions for `&' operators; consider casting explicitly for portability
warning: some implementations may not support implicit int -> uint conversions for `|=' operators; consider casting explicitly for portability
ghost commented 1 year ago

image

When Breath of the Wild is played using Vulkan on an Intel GPU, a large, rectangular region in front of Link is always rendered with a shadow, even though there is nothing in the game world causing that region to be shadowed. The region extends beyond the edges of the screen horizontally. The region is always aligned with the camera's yaw, and the distance at which it renders seems to be affected by the camera's pitch. When the area that the region covers is already shadowed (e.g. at night) the region doesn't darken the area further.

The only exceptions to this behavior that I have noticed are during cutscenes. In the cutscene where Link paraglides onto Vah Medoh, the box seems to move with him instead of the camera. Strangely, during Revali's "tour" of the Divine Beast where Link is not on-screen, the box moves with the camera again.

The issue occurs on both Windows and Ubuntu. On Windows, the effect is less pronounced, but the same region is definitely still affected.

I have tried disabling all graphics packs, enabling accurate barriers, and enabling the "shadows for Intel GPUs (Vulkan)" graphics pack.

Occurs since at least v1.26.2f and v2.0-22. log.txt

I have the same bug on Linux, but it doesn't happen to me on Windows, so I guess it's Mesa related?

Loatchi commented 1 year ago

Ok I was looking on yuzu's github repo and they seems to have fix this issue.

Here is the yuzu one.

Maybe there is a way to translate this solution into Cemu.

lisa-wolfgang commented 1 year ago

The shadow notably doesn't affect the surface of water. You can see in this screenshot that the Cryonis pillars are casting shadows on the water while the camera shadow is not visible:

image

hvcrios commented 1 year ago

Same here

I'm using the app image 2.0-51 version

I'm on EndeavorOS (arch based) with latest mesa and vulkan-intel drivers.

With openGL it's a bit different, and way less annoying, but it's still there, you can mostly notice it in areas with shadows, it's probably an intel thing that'll never get fixed most unfortunately, heck I was surprised it runs as well as it does on this POS anyway, it runs better than in the video, that was because of the recording overhead.

weird-shadow-thing2.webm

Squall-Leonhart commented 1 year ago

Ok I was looking on yuzu's github repo and they seems to have fix this issue.

Totally different issue

1e1 commented 6 months ago

I had this issue until 2.0-79 I have just updated my Batocera (Butterfly) which includes 2.0-83 and it’s now fixed!!! I don’t know if the fix is into Cemu or a Linux package (mesa, etc). It works, it’s wonderful!

@lisa-wolfgang @TGP17 @hvcrios Can you confirm it's resolved?

PhilRoll commented 5 months ago

I had this issue until 2.0-79 I have just updated my Batocera (Butterfly) which includes 2.0-83 and it’s now fixed!!! I don’t know if the fix is into Cemu or a Linux package (mesa, etc). It works, it’s wonderful!

@lisa-wolfgang @TGP17 @hvcrios Can you confirm it's resolved?

i still had the problem, i also use Batocera v39 (with integrated gpu iris xe). Have you changed any settings to fix the problem? what configuration do you have?

1e1 commented 5 months ago

i still had the problem, i also use Batocera v39 (with integrated gpu iris xe). Have you changed any settings to fix the problem? what configuration do you have?

The last stable has not yet the fix. I'm using the Butterfly stream. It's name is not a "v##", but ##-dev-HASH: image

You can manually download it on: https://mirrors.o2switch.fr/batocera/x86_64/butterfly/last/ Or into the update menu, choose Butterfly instead of Main: image (On this picture BETA is not a current valid stream)

Source:

hvcrios commented 5 months ago

I had this issue until 2.0-79 I have just updated my Batocera (Butterfly) which includes 2.0-83 and it’s now fixed!!! I don’t know if the fix is into Cemu or a Linux package (mesa, etc). It works, it’s wonderful!

@lisa-wolfgang @TGP17 @hvcrios Can you confirm it's resolved?

Indeed it's petty much perfect now! Hadn't followed up on this, didn't fire up Cemu for quite a while

Using 2.0-85, on fully updated Endeavor OS, so yeah, tough to say what it was, whether a cemu update or some mesa update.

Either way now it looks great, both on opengl and vulkan, don't even need the workaround graphic pack

goeiecool9999 commented 1 month ago

@lisa-wolfgang can this issue be closed?

lisa-wolfgang commented 1 month ago

Unfortunately, using the latest Mesa drivers and the latest commit, I still get the behavior as originally described.