After reading this very interesting recent blogpost from Epic: https://www.epicgames.com/fortnite/e...technical-blog
I was wondering about the mentioned: "Emulated Uniform Buffers" code path that is mentioned there that gave a big performance saving for Fortnite on Android devices.
Does anyone know how to use this? If it's not something that can be simply "enabled" with OpenGL then it would be great to see a little example project of how to implement it?
I was wondering about the mentioned: "Emulated Uniform Buffers" code path that is mentioned there that gave a big performance saving for Fortnite on Android devices.
Does anyone know how to use this? If it's not something that can be simply "enabled" with OpenGL then it would be great to see a little example project of how to implement it?
A number of optimizations in our OpenGL renderer gave small wins, but one of our biggest wins was a surprise and came as part of one of our memory optimizations: emulated uniform buffers. This is a code path UE4 has supported for years and is used for OpenGL ES2 devices that do not have native support for uniform buffers, aka constant buffers. Here’s how it works. At shader compilation time we identify all constants needed for a shader and pack them into an array from which the shader reads. We also store a mapping table that tells the engine where to gather constants from uniform buffers and where to place them in the constant array. At runtime, we keep uniform buffers in CPU accessible memory, use the mapping table to copy them to a temporary buffer, and upload all constants with a single glUniform4fv function call.
Comment