struct
DecalProjectorComponent
ECS component for deferred decal projectors
- Module
- Game
- Header
#include "Game/Components/DecalProjectorComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
Material* | material | Decal material (albedo, normal, metallic-roughness textures) Default nullptr. |
std::string | materialPath | VFS/relative path for serialization round-trip |
DecalProjection | projection | Projection direction (which axis/direction the decal projects along) Default DecalProjection::YNegative. |
Vec3 | size | Projection 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). |
float | fadeFactor | Blending Default 1.0f. |
float | angleFadeStart | cos(angle) where fade begins (1.0 = facing camera) Default 0.7f. |
float | angleFadeEnd | cos(angle) where fully transparent Default 0.3f. |
int32_t | drawOrder | Sorting priority (lower = rendered first) Default 0. |
bool | affectsBaseColor | Per-channel GBuffer write control (packed into DecalAffectFlag bits at submit) Default true. |
bool | affectsNormal | Default true. |
bool | affectsRoughness | Default true. |
bool | affectsMetallic | Default true. |
uint32_t | layerMask | Which 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. |
float | lifetime | Lifetime 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. |
float | fadeOutTime | Seconds 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. |
float | age | Seconds since the decal was placed, advanced by DecalSystem. Default 0.0f. |
bool | expired | Set 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
| Signature | Name | Description |
|---|---|---|
DecalProjectorComponent() = default | DecalProjectorComponent |
Public functions
| Returns | Name | Description |
|---|---|---|
float | GetEffectiveFade | Opacity multiplier for the current age: fadeFactor until the fade window opens, then a linear ramp to zero. |
Function details
DecalProjectorComponent
C++
DecalProjectorComponent() = defaultGetEffectiveFade
C++
float GetEffectiveFade() constOpacity 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