OGRE  2.3
Object-Oriented Graphics Rendering Engine
Ogre::ForwardPlusBase::CachedGridBuffer Struct Reference

#include <OgreForwardPlusBase.h>

Public Member Functions

 CachedGridBuffer ()
 

Public Attributes

ReadOnlyBufferPackedglobalLightListBuffer
 
TexBufferPackedgridBuffer
 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...
 

Constructor & Destructor Documentation

◆ CachedGridBuffer()

Ogre::ForwardPlusBase::CachedGridBuffer::CachedGridBuffer ( )
inline

Member Data Documentation

◆ globalLightListBuffer

ReadOnlyBufferPacked* Ogre::ForwardPlusBase::CachedGridBuffer::globalLightListBuffer

◆ gridBuffer

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


The documentation for this struct was generated from the following file: