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

prepass vertex shader always outputs world position #10657

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Nov 20, 2023

Objective

the pbr prepass vertex shader currently only sets VertexOutput::world_position when deferred or motion prepasses are enabled.
the field is always in the vertex output so is otherwise undetermined, and the calculation is very cheap.

Solution

always set the world position in the pbr prepass vert shader.

@robtfm robtfm changed the title prepass vertex shader should always output world position prepass vertex shader always outputs world position Nov 20, 2023
@robtfm robtfm added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Nov 20, 2023
@superdump superdump added this pull request to the merge queue Nov 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2023
@JMS55
Copy link
Contributor

JMS55 commented Nov 20, 2023

Btw, driver shader compilers (usually based on LLVM) should do dead code elimination very well. We probably don't need shaderdefs for some of these things.

@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 25, 2023
@alice-i-cecile
Copy link
Member

Can you please rebase / merge in main to get the latest CI check running on your PR?

@superdump superdump added this pull request to the merge queue Nov 28, 2023
Merged via the queue into bevyengine:main with commit d95d20f Nov 28, 2023
22 checks passed
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 S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants