close
Skip to content

[Merged by Bors] - Flexible camera bindings#1689

Closed
cart wants to merge 1 commit into
bevyengine:mainfrom
cart:flexible_camera_bindings
Closed

[Merged by Bors] - Flexible camera bindings#1689
cart wants to merge 1 commit into
bevyengine:mainfrom
cart:flexible_camera_bindings

Conversation

@cart
Copy link
Copy Markdown
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
Copy Markdown
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
Copy link
Copy Markdown

bors Bot commented Mar 19, 2021

@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