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

[Merged by Bors] - Pipelined separate shadow vertex shader #2727

Conversation

superdump
Copy link
Contributor

Objective

  • Avoid unnecessary work in the vertex shader of the numerous shadow passes
  • Have the natural order of bind groups in the pbr shader: view, material, mesh

Solution

  • Separate out the vertex stage of pbr.wgsl into depth.wgsl
  • Remove the unnecessary calculation of uv and normal, as well as removing the unnecessary vertex inputs and outputs
  • Use the depth.wgsl for shadow passes
  • Reorder the bind groups in pbr.wgsl and PbrShaders to be 0 - view, 1 - material, 2 - mesh in decreasing order of rebind frequency

@superdump superdump changed the base branch from main to pipelined-rendering August 25, 2021 12:07
@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Aug 25, 2021
@cart
Copy link
Member

cart commented Aug 25, 2021

Looks good to me! I expect this to conflict with the almost-done-merging #2726.

@superdump superdump force-pushed the pipelined-separate-shadow-vertex-shader branch from 5027e98 to 24d9d0e Compare August 25, 2021 20:06
@superdump
Copy link
Contributor Author

Looks good to me! I expect this to conflict with the almost-done-merging #2726.

Updated.

@cart cart added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Aug 25, 2021
@cart cart added this to the Bevy 0.6 milestone Aug 25, 2021
@cart
Copy link
Member

cart commented Aug 25, 2021

bors r+

bors bot pushed a commit that referenced this pull request Aug 25, 2021
# Objective

- Avoid unnecessary work in the vertex shader of the numerous shadow passes
- Have the natural order of bind groups in the pbr shader: view, material, mesh

## Solution

- Separate out the vertex stage of pbr.wgsl into depth.wgsl
- Remove the unnecessary calculation of uv and normal, as well as removing the unnecessary vertex inputs and outputs
- Use the depth.wgsl for shadow passes
- Reorder the bind groups in pbr.wgsl and PbrShaders to be 0 - view, 1 - material, 2 - mesh in decreasing order of rebind frequency
@bors
Copy link
Contributor

bors bot commented Aug 25, 2021

@bors bors bot changed the title Pipelined separate shadow vertex shader [Merged by Bors] - Pipelined separate shadow vertex shader Aug 25, 2021
@bors bors bot closed this Aug 25, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants