Skip to content

Most efficient transform upload #284

Answered by TheMostDiligent
RobertMtx asked this question in Q&A
Discussion options

You must be logged in to vote

A general rule of thumb for GPU programming is to perform as few updates or any issue commands for that matter as possible.
So the most efficient way would be to upload all your transforms into a buffer (e.g. structured buffer) and then load them from that buffer using e.g. instance ID or another object identifier.

A 3rd method I've considered is to place all static data into static buffers, and then just offset them for each object. But doing this is the same as using dynamic buffers according to sample documentation?

Yes, there will be some overhead for each draw call, so better to use index in the shader.

A 3rd method I've considered is to place all static data into static buffers, …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@RobertMtx
Comment options

@TheMostDiligent
Comment options

@RobertMtx
Comment options

@TheMostDiligent
Comment options

Answer selected by RobertMtx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants