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
WeightedOitSystem() = defaultWeightedOitSystem(const WeightedOitSystem &) = deleteWeightedOitSystem(WeightedOitSystem &&) = delete~WeightedOitSystem
~WeightedOitSystem()Public member functions
operator=
WeightedOitSystem &operator=(const WeightedOitSystem &) = deleteWeightedOitSystem &operator=(WeightedOitSystem &&) = deleteensureResources
bool ensureResources(int width, int height)Lazily (re-)allocate the FBO + 3 textures sized to (width, height).
Parameters
| Parameter | Description |
|---|---|
width | Target width in pixels. |
height | Target height in pixels. |
Returns true on success; false for a non-positive size.
release
void release()Release all owned GL handles. Safe to call multiple times.
fbo
unsigned int fbo() constReturns Shared framebuffer, or 0.
accumTex
unsigned int accumTex() constReturns RGBA16F accumulation texture, or 0.
revealTex
unsigned int revealTex() constReturns R16F reveal (transmittance) texture, or 0.
opaqueTex
unsigned int opaqueTex() constReturns RGBA8 opaque-color texture, or 0.
width
int width() constReturns Allocated width.
height
int height() constReturns Allocated height.