gprt-org / GPRT

MIT License
22 stars 6 forks source link

Push constants #73

Closed natevm closed 1 year ago

natevm commented 1 year ago

This PR introduces a change to the GPRT API to allow users to upload a small set of push constants when launching raygen, compute, and raster programs.

Push constants are a Vulkan mechanism that allows users to parameterize their shaders without using buffers, or making changes to the shader binding table.

The compromise is that push constant structures are very small---128 bytes or less---but these can still be very useful for small, regular changes like camera manipulation, frame IDs, buffer selection for compute shaders, etc.