Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
Light.hpp File Reference

2D light source component for the Lit material domain. More...

Include dependency graph for Light.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  esengine::ecs::Light
 A 2D light contributing to Lit-shaded materials. More...
struct  esengine::ecs::LightProbeVolume
 A box of baked irradiance: the light for what a bake cannot hold still. More...

Namespaces

namespace  esengine
namespace  esengine::ecs

Enumerations

enum class  esengine::ecs::LightType : i32 { esengine::ecs::Point = 0 , esengine::ecs::Directional = 1 , esengine::ecs::Ambient = 2 , esengine::ecs::Spot = 3 }
 2D light kind. Point uses the Transform position + radius falloff; Directional uses the Transform's forward with no attenuation; Ambient adds a flat term independent of normal/position. More...

Detailed Description

2D light source component for the Lit material domain.

A scene's Light components are gathered by the render collect path into the per-frame LightConstants UBO (binding 2); Lit-domain material shaders read them via the injected applyLighting2D() helper. Point/Directional/Spot lights occupy a light slot; Ambient lights sum into the ambient term. This component carries only the light's intrinsic parameters. Where a light sits and where it aims are the entity's Transform: Point/Spot read their world position from it (and are skipped without one), and Directional/Spot aim along the entity's forward — its rotation applied to -Z, which is what an unrotated light has always shone along.

Author
ESEngine Team
Date
2026

Definition in file Light.hpp.