class

FDecalPool

Fixed-capacity ring of runtime-spawned decals: past capacity the oldest slot is recycled, so cost stays flat no matter the spawn rate.

Module
Game
Header
#include "Renderer/DecalSystem.h"
Namespace
Mowo

Authored decals placed in the scene are not pool members and are never recycled — only what Spawn hands out is tracked.

Public functions

ReturnsNameDescription
voidSetScene
voidSetCapacity0 leaves the pool unbounded (the editor's default, so authoring is never silently truncated).
uint32_tGetCapacity
uint32_tGetLiveCount
uint32_tGetRecycledCount
EntityIDSpawnPlaces a decal projecting along -normal at position.
Vec3RotationFromSurfaceNormalEuler angles in radians, in TransformComponent's Rx * Ry * Rz order, that put the decal's local +Y along normal — so the default -Y projection axis points into the surface.
voidClear

Function details

SetScene

C++
void SetScene(Scene* scene)

SetCapacity

C++
void SetCapacity(uint32_t capacity)

0 leaves the pool unbounded (the editor's default, so authoring is never silently truncated).

GetCapacity

C++
uint32_t GetCapacity() const

GetLiveCount

C++
uint32_t GetLiveCount() const

GetRecycledCount

C++
uint32_t GetRecycledCount() const

Spawn

C++
EntityID Spawn(const Vec3& position, const Vec3& normal, const Vec3& size, const std::string& materialPath, float lifetime)

Places a decal projecting along -normal at position. Returns INVALID_ENTITY when the pool has no scene.

RotationFromSurfaceNormal

C++
static Vec3 RotationFromSurfaceNormal(const Vec3& normal)

Euler angles in radians, in TransformComponent's Rx * Ry * Rz order, that put the decal's local +Y along normal — so the default -Y projection axis points into the surface.

Clear

C++
void Clear()
Generated from Renderer/DecalSystem.h via game.json · Nov 5, 2026Version 1.0.0