[Closed] How to update efficiently uniform buffer in shaders?
My team and I are porting few D3D11 custom shaders to RHI.
The shaders make use of constant buffers (cbuffer) which in the RHI world
are called uniform buffers. We got it working using
I attempted some workarounds:
The problem is that unlike all other data objects (vertex, index and structured buffers, textures)
After some digging around the codebase I found that the engine uses cbuffers in only a few places, none
of which requires frequent updates...except some D3D-related slate magic which actually defines
So, am I missing something or is there a performant way to update a uniform buffer?
The question has been closed May 22 '16 at 07:21 PM by AndrewHurley for the following reason:
The question is answered, right answer was accepted
Hi Dimitar, Unreal's current handling of UB's is that they are persistent/read-only, hence the flags for multiframe or multidraw so the RHI can decide how to allocate it (it might just reuse an entry from a pool on some RHIs). We have been discussing other ways to perform update but it's still a matter of debate.
answered May 22 '16 at 07:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here