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

Forward rendering seems broken #16679

Closed
JMS55 opened this issue Dec 6, 2024 · 8 comments · Fixed by #17565
Closed

Forward rendering seems broken #16679

JMS55 opened this issue Dec 6, 2024 · 8 comments · Fixed by #17565
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples P-High This is particularly urgent, and deserves immediate attention P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Milestone

Comments

@JMS55
Copy link
Contributor

JMS55 commented Dec 6, 2024

Bevy version

72f096c

Relevant system information

2024-12-06T04:20:17.216608Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Home", kernel: "22631", cpu: "AMD Ryzen 7 5800X 8-Core Processor", core_count: "8", memory: "15.9 GiB" }
2024-12-06T04:20:17.720519Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 3080", vendor: 4318, device: 8710, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "560.94", backend: Vulkan }

What you did

Run the deferred_rendering example

What went wrong

Forward rendering seems broken (forward + prepass is fine)

  • POM seems broken on the cube
  • Normal maps seem to be missing from the flight helmet
@JMS55 JMS55 added A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior labels Dec 6, 2024
@pcwalton
Copy link
Contributor

pcwalton commented Dec 6, 2024

Bisecting this. The lack of POM on the cube repros even as far back as Sep 13. So that at least isn't a recent regression.

@DGriffin91
Copy link
Contributor

DGriffin91 commented Dec 6, 2024

Note: Lack of parallax on the cube in forward + prepass was in the initial creation of this scene. Forward + prepass has never supported parallax mapping. (Not to be confused with the current issue with parallax on the cube in forward on current main)

@JMS55
Copy link
Contributor Author

JMS55 commented Dec 6, 2024

Yes, but it's also broken in pure forward now (there's some weird ghosting 🙃)

@pcwalton
Copy link
Contributor

pcwalton commented Dec 6, 2024

The culprit for the loss of normal mapping is the retained render world, #15320.

Note that deferred was broken at the time that commit landed (due to PCSS) and wasn't fixed until #15656, which is ddd4b4d. So you'll want to git cherry-pick ddd4b4daf8bb3df1dac0fd5f453269ff4bd4f99a if you check out that commit.

@JMS55 JMS55 added P-High This is particularly urgent, and deserves immediate attention P-Regression Functionality that used to work but no longer does. Add a test for this! labels Dec 8, 2024
@JMS55 JMS55 added this to the 0.15.1 milestone Dec 8, 2024
@mockersf mockersf modified the milestones: 0.15.1, 0.15.2 Dec 26, 2024
@BenjaminBrienen BenjaminBrienen added S-Needs-Investigation This issue requires detective work to figure out what's going wrong D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jan 5, 2025
@hukasu
Copy link
Contributor

hukasu commented Jan 21, 2025

one of the issues being described here is the shadow being retained when changing from Deferred or Forward + Prepass into Forward, right?

Image

taken using 85eceb0

@hukasu
Copy link
Contributor

hukasu commented Jan 27, 2025

things got worse on 7aeb1c5

Deferred
Image

Deferred -> Forward
Image

Forward -> Deferred
Image

Deferred -> Forward + Prepass
Image

Forward + Prepass -> Forward
Image

Forward -> Deferred
Image

@hukasu
Copy link
Contributor

hukasu commented Jan 27, 2025

git bisect done
dda97880c48ff39c3a77ff2eb398c34b382cb771 is the first bad commit

@pcwalton
Copy link
Contributor

The root of the problem is that we add prepasses to the render world views but don't remove them. #17565 fixes that but can't be merged yet because it exposes other bugs.

@mockersf mockersf modified the milestones: 0.15.2, 0.15.3 Feb 6, 2025
pcwalton added a commit to pcwalton/bevy that referenced this issue Feb 12, 2025
main world.

This makes switching rendering modes in `deferred_rendering` work again.

Closes bevyengine#16679.
github-merge-queue bot pushed a commit that referenced this issue Feb 14, 2025
…main world. (#17565)

This makes switching rendering modes in `deferred_rendering` work again.

Closes #16679.
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 D-Straightforward Simple bug fixes and API improvements, docs, test and examples P-High This is particularly urgent, and deserves immediate attention P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants