bevy icon indicating copy to clipboard operation
bevy copied to clipboard

shadows on many_foxes move around when resizing the window.

Open hymm opened this issue 3 years ago • 8 comments
trafficstars

Bevy version

0.8, main 9b56b549ad866ee200b890216b2d6dd39cfa34ad (Nov 10, 2022)

Relevant system information

Windows 11 AdapterInfo { name: "AMD Radeon RX 6600", vendor: 4098, device: 29695, device_type: DiscreteGpu, driver: "AMD proprietary driver", driver_info: "22.9.2", backend: Vulkan }

What you did

Ran cargo run --release --example many_foxes and resized the window by grabbing the bottom right with the mouse.

What went wrong

Shadows on the foxes are misplaced sometimes.

image

image

hymm avatar Nov 10 '22 20:11 hymm

Could you test with this: https://github.com/bevyengine/bevy/pull/6543 ? I don't think it will affect this one but maybe...

superdump avatar Nov 10 '22 22:11 superdump

this seems to be due to https://github.com/bevyengine/bevy/pull/6384

mockersf avatar Nov 10 '22 22:11 mockersf

this seems to be due to #6384

Ah... I think it was weird stuff like this which was why I didn't use the light's translation and commented as such. And when I made an attempt to achieve the same kind of thing, I instead adjusted the left/right/top/bottom/near/far.

superdump avatar Nov 10 '22 22:11 superdump

I can't reproduce this on Manjaro with a 2070 SUPER.

this seems to be due to #6384

Looking at the code, I wouldn't expect that behavior to change on different hardware, but it would be great if people could test that. Otherwise, a git disect would be smart

tim-blackbird avatar Nov 11 '22 11:11 tim-blackbird

I can't reproduce it either on Fedora with an Intel integrated GPU

greytdepression avatar Nov 11 '22 13:11 greytdepression

Can't reproduce. Both after the latest commit c4e791d62890cc02773564bad7592345d2b8f05c, or going back ~5 commits.

Windows 11 AdapterInfo { name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8710, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "526.47", backend: Vulkan }

JMS55 avatar Nov 11 '22 19:11 JMS55

It can be reproduce in my computer, It's seems about AMD GPU

Windows 11 AdapterInfo { name: "AMD Radeon(TM) Graphics", vendor: 4098, device: 5761, device_type: IntegratedGpu, driver: "AMD proprietary driver", driver_info: "22.20.28", backend: Vulkan }

haike0513 avatar Nov 12 '22 10:11 haike0513

My observations:

  • It happens already in commit 76829f93
  • c3c40883 is still affected
  • The shadows are off immediately after the example window is opened
  • It seems the the window size has to be "just right" for it to work properly
  • My system: bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX 6700 XT (RADV NAVI22)", vendor: 4098, device: 29663, device_type: DiscreteGpu, backend: Vulkan } and Arch Linux

Indy2222 avatar Nov 12 '22 14:11 Indy2222

this seems to be due to https://github.com/bevyengine/bevy/pull/6384

Tried the commit before that one was merged, still broken.

Elabajaba avatar Jan 22 '23 01:01 Elabajaba

After a bunch of back and forth on discord, this seems to be some sort of rounding or floating point precision issue with the absolutely massive plane that the many_foxes example uses.

@robtfm reproduced the issues on a 3070 with a 500000000 sized plane, while the current 500000 plane causes issues on AMD GPUs.

Changing it to a 5000 sized plane seems to fix it.

Elabajaba avatar Jan 23 '23 01:01 Elabajaba

fixed in above pr

hymm avatar Jan 28 '23 18:01 hymm

reopening issue as we should triage why nvidia and amd are different.

hymm avatar Jan 28 '23 18:01 hymm