More performance on Nvidia GPUs with UBOs


The application's rendering engine is based on a tiled forward solution so it needs (relatively) large lighting data buffers. The previous implementation used shader storage buffers (its full name: shader storage buffer object, SSBO in short) which have a nice, convenient  property: the GPU can access (read and write) the whole buffer at once. The shader storage buffers have a sibling called uniform buffers (its full name uniform buffer object, UBO in short) which the GPUs can only read.  However, (most of) Nvidia GPUs really like this sibling which means they can read data from there much faster than shader storage buffers but they can't read the whole buffer at once only a 64 kB range.

So I had to compress the lighting information as much as possible in order to get this performance gain and the result is that "only" 286 lights (including light probes) can be visible on the screen at once.

Get Star Trek - STVOY:Short Stories

Leave a comment

Log in with itch.io to leave a comment.