Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
EngineTextureUnits.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
13#pragma once
14
15#include "../../core/Types.hpp"
16
17namespace esengine {
18
25inline constexpr const char* SHADOW_MAP_SAMPLER = "u_shadowMap";
26inline constexpr u32 SHADOW_MAP_TEXTURE_UNIT = 2;
27
29inline constexpr const char* ENV_MAP_SAMPLER = "u_envMap";
30inline constexpr u32 ENV_MAP_TEXTURE_UNIT = 3;
31
33inline constexpr const char* MORPH_DELTA_SAMPLER = "u_morphDeltas";
34inline constexpr u32 MORPH_DELTA_TEXTURE_UNIT = 4;
35
43inline constexpr const char* LIGHTMAP_SAMPLER = "u_lightmap";
44inline constexpr u32 LIGHTMAP_TEXTURE_UNIT = 5;
45
51inline constexpr const char* PROBE_GRID_SAMPLER = "u_probeGrid";
52
60inline constexpr const char* SHAPE_2D_SAMPLER = "u_lightShape2D";
61inline constexpr u32 SHAPE_2D_TEXTURE_UNIT = 6;
62
70inline constexpr const char* SHADOW_2D_SAMPLER = "u_shadow2D";
71inline constexpr u32 SHADOW_2D_TEXTURE_UNIT = 7;
72
73// Fragment-only frame texture. Units 0..15 retain the material, batch and vertex-record ABI.
74inline constexpr const char* WATER_SUN_SAMPLER = "u_waterSunField";
75inline constexpr u32 WATER_SUN_TEXTURE_UNIT = 16;
76
77} // namespace esengine
Core type definitions and utilities for ESEngine.
constexpr const char * LIGHTMAP_SAMPLER
The baked-light atlas, and the unit a lightmapped mesh samples it from.
constexpr const char * MORPH_DELTA_SAMPLER
The sampler a mesh's morph deltas arrive through, and the unit it is pinned to.
constexpr u32 SHADOW_2D_TEXTURE_UNIT
constexpr const char * PROBE_GRID_SAMPLER
The frame's probe atlas, read per pixel, on the bake's unit.
constexpr u32 LIGHTMAP_TEXTURE_UNIT
constexpr u32 SHADOW_MAP_TEXTURE_UNIT
constexpr u32 WATER_SUN_TEXTURE_UNIT
constexpr u32 MORPH_DELTA_TEXTURE_UNIT
constexpr const char * WATER_SUN_SAMPLER
constexpr const char * SHADOW_MAP_SAMPLER
The injected shadow-map sampler, and the texture unit Shader::compile pins it to.
constexpr const char * SHADOW_2D_SAMPLER
The 2D shadow mask, and the texture unit every Lit shader samples it from.
constexpr const char * ENV_MAP_SAMPLER
The injected reflection sampler, one unit past the shadow map's.
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
constexpr u32 SHAPE_2D_TEXTURE_UNIT
constexpr u32 ENV_MAP_TEXTURE_UNIT
constexpr const char * SHAPE_2D_SAMPLER
The 2D light-shape mask, and the unit below the shadow mask's.