OGRE-Next
4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
#include <OgreForwardPlusBase.h>
Public Member Functions | |
CachedGridBuffer () | |
Public Attributes | |
ReadOnlyBufferPacked * | globalLightListBuffer |
TexBufferPacked * | gridBuffer |
We use a TexBufferPacked instead of ReadOnlyBufferPacked because there is a considerable slowdown when trying to address a R16_UNORM buffer using bit unpacking, i.e. More... | |
|
inline |
ReadOnlyBufferPacked* Ogre::ForwardPlusBase::CachedGridBuffer::globalLightListBuffer |
TexBufferPacked* Ogre::ForwardPlusBase::CachedGridBuffer::gridBuffer |
We use a TexBufferPacked instead of ReadOnlyBufferPacked because there is a considerable slowdown when trying to address a R16_UNORM buffer using bit unpacking, i.e.
via: (idx & 0x01) != 0u ? (bufferVar[idx >> 1u] >> 16u) : (bufferVar[idx >> 1u] & 0xFFFFu)
RenderSystems which natively support ushort in UAVs wouldn't be affected but it's a lot of work maintaining so many paths and a major RenderSystem doesn't support it.
Alternatively R32_UNORM could be used w/ ReadOnlyBufferPacked, but that's twice the memory (and less cache friendly). Only Android really could use ReadOnlyBufferPacked, but if you need to exceed the 65535 texel limit, it's likely too slow for phones anyway