Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many_foxes stress test example has very visible shadow artifacting #5118

Closed
colepoirier opened this issue Jun 27, 2022 · 15 comments
Closed

many_foxes stress test example has very visible shadow artifacting #5118

colepoirier opened this issue Jun 27, 2022 · 15 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@colepoirier
Copy link
Contributor

Bevy version

bevy main 9eb6928

[Optional] Relevant system information

cargo 1.61.0 (a028ae4 2022-04-29)
stable-x86_64-unknown-linux-gnu

linux mint 20.3 5.18.6-051806-generic

AdapterInfo { name: "AMD RADV RENOIR", vendor: 4098, device: 5708, device_type: IntegratedGpu, backend: Vulkan }

What you did

Run cargo r -r --example many_foxes

What went wrong

Foxes closes to the camera have grey bar artifacts instead of shadows like the foxes further from the camera:

Screenshot_from_2022-06-27_11-26-52

@colepoirier colepoirier added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jun 27, 2022
@james7132 james7132 added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Jun 27, 2022
@james7132 james7132 added this to the Bevy 0.8 milestone Jun 27, 2022
@james7132
Copy link
Member

Adding this to 0.8, as this would be a pretty serious shadow rendering regression.

@mockersf
Copy link
Member

not reproduced on macOS. A vulkan issue?

@cart
Copy link
Member

cart commented Jun 27, 2022

I can't repro on Linux/Vulkan/Nvidia GTX 1070 (proprietary driver):
image

@james7132 james7132 added O-Linux Specific to the Linux desktop operating system S-Needs-Investigation This issue requires detective work to figure out what's going wrong labels Jun 27, 2022
@james7132
Copy link
Member

james7132 commented Jun 27, 2022

This seems isolated to specific Linux drivers, and may be something upstream of Bevy. Marking down as platform specific.

@colepoirier
Copy link
Contributor Author

Grahpics driver info

inxi -G
Graphics:
  Device-1: AMD driver: amdgpu v: kernel 
  Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa resolution: 1920x1080~60Hz 
  OpenGL: 
  renderer: AMD RENOIR (DRM 3.46.0 5.18.6-051806-generic LLVM 12.0.0) 
  v: 4.6 Mesa 21.2.6

@colepoirier
Copy link
Contributor Author

Also worth noting that the rendering appears to be shifted down within the window which strikes me as odd/a bug. This screenshot is taken at 1920 x 1080:

Screenshot_from_2022-06-27_14-23-48

@alice-i-cecile alice-i-cecile removed this from the Bevy 0.8 milestone Jun 28, 2022
@alice-i-cecile
Copy link
Member

Clearing from the milestone as this appears to be driver-driven. @colepoirier, have you updated your graphics drivers?

@colepoirier
Copy link
Contributor Author

Clearing from the milestone as this appears to be driver-driven. @colepoirier, have you updated your graphics drivers?

Indeed. My graphics drivers are up to date with the latest release. Unfortunately testing with dev mesa drivers isn’t something I can do without taking a pretty permanent dependency on them; last time I did this I ended up having to reinstall my whole OS to get back to released mesa deivers because of how apt package depencies seem to work 😢

@rpjohnst
Copy link

rpjohnst commented Jul 30, 2022

I also see this, using the v0.8.0 tag, on Windows with an AMD integrated GPU (specifically a Surface Laptop 3, which claims to have some sort of "Microsoft Edition" Ryzen), with both the Vulkan and Dx12 WGPU backends. The relevant log output:

2022-07-30T20:47:34.536221Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon(TM) RX Vega11 Graphics", vendor: 4098, device: 5592, device_type: IntegratedGpu, backend: Vulkan }

A graphics debugger shows that the shadow map looks reasonably unscathed, though it has some pretty heavy banding along the floor plane that corresponds to the shape of the shadow artifacts. Maybe some sort of precision issue that only shows up on some hardware and/or drivers?

I've tried tweaking the parameters of the light and camera but haven't found any smoking guns- let me know if there's anything else I can try or collect!

@JorgeVV
Copy link

JorgeVV commented Jul 30, 2022

Experiencing this in a Macbook Pro 2016 on latest branch.

INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon Pro 450", vendor: 0, device: 0, device_type: DiscreteGpu, backend: Metal }

@id05
Copy link

id05 commented Oct 11, 2022

I have same issue on both drivers + missing textures on radeon-vulkan

Arch Linux
cargo 1.64.0 (387270bc7 2022-09-16)
Kernel: 5.19.13-arch1-1

Are they suppose to be yellow?
AdapterInfo { name: "AMD Radeon Vega 8 Graphics", vendor: 4098, device: 5597, device_type: IntegratedGpu, backend: Vulkan }
изображение

AdapterInfo { name: "AMD RADV RAVEN", vendor: 4098, device: 5597, device_type: IntegratedGpu, backend: Vulkan }

изображение

@SecretPocketCat
Copy link
Contributor

This issue also happens on Win 11 with RX590 on c4e791d
I updated my driver today for the newest for shadow tech, but no dice

AdapterInfo { name: "Radeon RX 590 Series", vendor: 4098, device: 26591, device_type: DiscreteGpu, driver: "AMD proprietary driver", driver_info: "22.5.1", backend: Vulkan }

many_foxes
2022-11-11 07_43_55-🦊🦊🦊 Many Foxes! 🦊🦊🦊

shadow_caster_receiver - Using PointLight
2022-11-11 07_48_21-  - C__Projects_GameDev_bevy_bevy_Cargo toml

shadow_biases
2022-11-11 07_46_09-  - C__Projects_GameDev_bevy_bevy_Cargo toml

@superdump
Copy link
Contributor

shadow_biases is meant to look like that unless you adjusted the biases to appropriate values.

@SecretPocketCat
Copy link
Contributor

shadow_biases is meant to look like that unless you adjusted the biases to appropriate values.

My bad, the rest still applies though, esp. the many_foxes example.

@Elabajaba
Copy link
Contributor

This was fixed for many_foxes in #7339 (the huge plane with no subdivisions was the root cause), and there's a tracking issue to look into why AMD/Nvidia/etc behave differently in #6542 (AMD iGPUs reproduce this issue at smaller plane sizes than AMD dGPUs, and Nvidia and Apple M1s can reproduce it if you use an even more massive plane than many_foxes used to use).

@danchia danchia closed this as completed Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

No branches or pull requests