struct

DecalProjectorComponent

ECS component for deferred decal projectors

Module
Game
Header
#include "Game/Components/DecalProjectorComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
boolenabledDefault true.
Material*materialDecal material (albedo, normal, metallic-roughness textures) Default nullptr.
std::stringmaterialPathVFS/relative path for serialization round-trip
DecalProjectionprojectionProjection direction (which axis/direction the decal projects along) Default DecalProjection::YNegative.
Vec3sizeProjection volume, in metres, as the box's FULL extent along each local axis (the projector mesh is a unit cube spanning -0.5..0.5, scaled by this on top of the entity transform). The projection axis component is the depth the decal reaches into geometry, half of it on each side of the entity's origin. Default Vec3(1.0f, 1.0f, 1.0f).
floatfadeFactorBlending Default 1.0f.
floatangleFadeStartcos(angle) where fade begins (1.0 = facing camera) Default 0.7f.
floatangleFadeEndcos(angle) where fully transparent Default 0.3f.
int32_tdrawOrderSorting priority (lower = rendered first) Default 0.
boolaffectsBaseColorPer-channel GBuffer write control (packed into DecalAffectFlag bits at submit) Default true.
boolaffectsNormalDefault true.
boolaffectsRoughnessDefault true.
boolaffectsMetallicDefault true.
uint32_tlayerMaskWhich camera layer masks this decal is visible to. A view whose culling mask shares no bit with this one skips the decal entirely — the same relationship an entity's layer has with the camera, expressed as a mask so one decal can be limited to, say, the gameplay view but not a security-camera view. Default 0xFFFFFFFF.
floatlifetimeLifetime in seconds; 0 means the decal never expires (an authored floor marking). Anything a shooter sprays at runtime — bullet holes, scorch marks, blood — wants a finite one, because the alternative is an unbounded pile of draw calls over a long match. Default 0.0f.
floatfadeOutTimeSeconds of fade at the end of the lifetime. The decal's opacity ramps to zero over this window instead of popping out of existence. Default 0.5f.
floatageSeconds since the decal was placed, advanced by DecalSystem. Default 0.0f.
boolexpiredSet when the lifetime runs out. The owning entity is destroyed by DecalSystem on the following tick; the pool watches this to reclaim slots it handed out. Default false.

Constructors

SignatureNameDescription
DecalProjectorComponent() = defaultDecalProjectorComponent

Public functions

ReturnsNameDescription
floatGetEffectiveFadeOpacity multiplier for the current age: fadeFactor until the fade window opens, then a linear ramp to zero.

Function details

DecalProjectorComponent

C++
DecalProjectorComponent() = default

GetEffectiveFade

C++
float GetEffectiveFade() const

Opacity multiplier for the current age: fadeFactor until the fade window opens, then a linear ramp to zero.

Generated from Game/Components/DecalProjectorComponent.h via game.json · Nov 5, 2026Version 1.0.0