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

Added Globals struct to prepass shader #8070

Merged
merged 3 commits into from
Mar 13, 2023

Conversation

Anti-Alias
Copy link
Contributor

Objective

  • The bevy prepass shaders should have access to the Globals struct, same as the main pass. This is necessary for effects like wind vertex shaders or any shader that depends on time.

Solution

  • Adding Globals binding to the prepass shader's view bind group and specify it in the prepass pipeline.

@github-actions
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Copy link
Contributor

@superdump superdump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like CI is complaining about formatting. Please run cargo fmt and update the PR. Plus leave the new line at the end of the shader as commented. Then we can get this merged.

@@ -15,4 +18,4 @@ var<uniform> mesh: Mesh;
@group(2) @binding(1)
var<uniform> joint_matrices: SkinnedMesh;
#import bevy_pbr::skinning
#endif
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing new line

@superdump superdump added this pull request to the merge queue Mar 13, 2023
@james7132 james7132 added C-Enhancement A new feature A-Rendering Drawing game state to the screen S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Mar 13, 2023
@james7132
Copy link
Member

Does this count as a breaking change? The bindings for the shader do seem like a public interface that should be governed by semver.

@james7132 james7132 added this to the 0.11 milestone Mar 13, 2023
@james7132
Copy link
Member

Conservatively assigning this to 0.11 for now, feel free to move to 0.10.1 if this shouldn't be considered breaking.

@superdump
Copy link
Contributor

I agree it probably is a breaking change to the shader interfaces.

@james7132 james7132 added the C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide label Mar 13, 2023
@github-actions
Copy link
Contributor

It looks like your PR is a breaking change, but you didn't provide a migration guide.

Could you add some context on what users should update when this change get released in a new version of Bevy?
It will be used to help writing the migration guide for the version. Putting it after a ## Migration Guide will help it get automatically picked up by our tooling.

Merged via the queue into bevyengine:main with commit 884b9b6 Mar 13, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
Shfty pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 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-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide C-Enhancement A new feature 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.

4 participants