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] - Flexible camera bindings #1689

Closed
wants to merge 1 commit into from

Conversation

cart
Copy link
Member

@cart cart commented Mar 19, 2021

Alternative to #1203 and #1611

Camera bindings have historically been "hacked in". They were required in all shaders and only supported a single Mat4. PBR (#1554) requires the CameraView matrix, but adding this using the "hacked" method forced users to either include all possible camera data in a single binding (#1203) or include all possible bindings (#1611).

This approach instead assigns each "active camera" its own RenderResourceBindings, which are populated by CameraNode. The PassNode then retrieves (and initializes) the relevant bind groups for all render pipelines used by visible entities.

  • Enables any number of camera bindings , including zero (with any set or binding number ... set 0 should still be used to avoid rebinds).
  • Renames Camera binding to CameraViewProj
  • Adds CameraView binding

@cart cart added the A-Rendering Drawing game state to the screen label Mar 19, 2021
@cart cart added this to the Bevy 0.5 milestone Mar 19, 2021
@cart
Copy link
Member Author

cart commented Mar 19, 2021

bors r+

bors bot pushed a commit that referenced this pull request Mar 19, 2021
Alternative to #1203 and #1611

Camera bindings have historically been "hacked in". They were _required_ in all shaders and only supported a single Mat4. PBR (#1554) requires the CameraView matrix, but adding this using the "hacked" method forced users to either include all possible camera data in a single binding (#1203) or include all possible bindings (#1611).

This approach instead assigns each "active camera" its own RenderResourceBindings, which are populated by CameraNode. The PassNode then retrieves (and initializes) the relevant bind groups for all render pipelines used by visible entities. 

* Enables any number of camera bindings , including zero (with any set or binding number ... set 0 should still be used to avoid rebinds).
* Renames Camera binding to CameraViewProj
* Adds CameraView binding
@bors bors bot changed the title Flexible camera bindings [Merged by Bors] - Flexible camera bindings Mar 19, 2021
@bors bors bot closed this Mar 19, 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.

1 participant