Skip to content

raisin::WeightedOitSystem ​

class · #include <rayrai/WeightedOitSystem.hpp>

Owns the GL resources for weighted-blended order-independent transparency (Meshkin / McGuire-Bavoil): an RGBA16F accumulation target, an R16F reveal target, an RGBA8 opaque-color target, and a shared FBO. Re-allocated automatically when the requested size changes.

Extracted from RayraiWindow as part of the 1.1 decomposition. Caller is responsible for using the texture handles in the actual render-pass compositing — this class only manages the resources.

Constructors & destructor ​

WeightedOitSystem ​

cpp
WeightedOitSystem() = default
cpp
WeightedOitSystem(const WeightedOitSystem &) = delete
cpp
WeightedOitSystem(WeightedOitSystem &&) = delete

~WeightedOitSystem ​

cpp
~WeightedOitSystem()

Public member functions ​

operator= ​

cpp
WeightedOitSystem &operator=(const WeightedOitSystem &) = delete
cpp
WeightedOitSystem &operator=(WeightedOitSystem &&) = delete

ensureResources ​

cpp
bool ensureResources(int width, int height)

Lazily (re-)allocate the FBO + 3 textures sized to (width, height).

Parameters

ParameterDescription
widthTarget width in pixels.
heightTarget height in pixels.

Returns true on success; false for a non-positive size.

release ​

cpp
void release()

Release all owned GL handles. Safe to call multiple times.

fbo ​

cpp
unsigned int fbo() const

Returns Shared framebuffer, or 0.

accumTex ​

cpp
unsigned int accumTex() const

Returns RGBA16F accumulation texture, or 0.

revealTex ​

cpp
unsigned int revealTex() const

Returns R16F reveal (transmittance) texture, or 0.

opaqueTex ​

cpp
unsigned int opaqueTex() const

Returns RGBA8 opaque-color texture, or 0.

width ​

cpp
int width() const

Returns Allocated width.

height ​

cpp
int height() const

Returns Allocated height.

RaiSim — physics for robotics and AI.