OGRE-Next: Ogre::ForwardPlusBase::CachedGridBuffer Struct Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Ogre::ForwardPlusBase::CachedGridBuffer Struct Reference

`#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.

## Constructor & Destructor Documentation

## ◆ CachedGridBuffer()

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

References globalLightListBuffer, and gridBuffer.

## Member Data Documentation

## ◆ globalLightListBuffer

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

Referenced by CachedGridBuffer().

## ◆ 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

Referenced by CachedGridBuffer().

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

- OgreForwardPlusBase.h