Skip to content

Engine → Renderer

light.h

Lights as the extraction contract carries them. Units follow glTF KHR_lights_punctual: lux for directional lights, candela for point and spot lights.

Structs

File Description
light

Enumerations

light_type

enum class light_type : u8 {
    DIRECTIONAL = 0,
    POINT,
    SPOT
};

shadow_filter

enum class shadow_filter : u8 {
    DEFAULT = 0,
    HARD,
    PCF,
    PCSS
};

Per-light shadow filter. DEFAULT resolves to shadow_settings::defaultFilter at render time so the editor can flip every light at once.

Constants

Name Type Value Description
MAX_SHADOW_TILE_SIZE inline constexpr u16 1024
MIN_SHADOW_TILE_SIZE inline constexpr u16 256 The smallest and largest atlas tile a local light may request.

Functions

Public

clamp_shadow_resolution

[[nodiscard]] CONJURE_API u16 clamp_shadow_resolution(
    u16 requested) noexcept;

Rounds a requested tile size to the nearest allowed size (256, 512 or 1024).

to_string

[[nodiscard]] CONJURE_API std::string_view to_string(
    light_type type) noexcept;

The enumerator name of a light type ("POINT").

[[nodiscard]] CONJURE_API std::string_view to_string(
    shadow_filter filter) noexcept;

The enumerator name of a shadow filter ("PCF").