Consider using push constants for camera data #1372
Labels
A-Rendering
Drawing game state to the screen
C-Code-Quality
A section of code that is hard to understand or change
Right now the
CameraNode
passes theViewProj
matrix to the shader by maintaining a uniform buffer that is hardcoded to be binded onlayout(set = 0, binding = 0)
. @cart explained in #1203 that the reason for this is thatGiven these, would it be a good idea to put the camera data in push constants, now that wgpu-rs has starting to support push constants?
Based on wgpu::Features, wgpu-rs supports push constants on all five native APIS: Vulkan, Metal, DX11, DX12, and OpenGL. But PUSH_CONSTANTS was not supported on web.
Using push constants for camera data addressed the problem mentioned above because push constants are, by its nature, a "per pass" setup.
The text was updated successfully, but these errors were encountered: