Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
PlanarReflection.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
3#pragma once
6
7namespace esengine::ecs {
9enum class ReflectionAxis : u8 { X, Y, Z };
10ES_ENUM()
12ES_ENUM()
14
19ES_COMPONENT(stability=experimental)
21 ES_PROPERTY(enum=ReflectionAxis, category=Capture, tooltip="Local normal axis, transformed with the entity. Y for a floor, Z for a mirror.")
23 ES_PROPERTY(min=0, step=0.005, category=Capture, tooltip="Clip offset in world units; excludes geometry behind the reflecting plane.")
25 ES_PROPERTY(bitmask_source=sortingLayers, category=Capture, tooltip="Sorting-layer bits captured by the reflection. The receiving surface and screen UI are excluded.")
26 u32 cullingMask{0xFFFFFFFFu};
27 ES_PROPERTY(enum=ReflectionQuality, category=Quality)
29 ES_PROPERTY(min=0.125, max=1, step=0.125, category=Quality, shown_when=quality:Custom)
31 ES_PROPERTY(min=64, max=4096, step=64, category=Quality, shown_when=quality:Custom)
32 u32 maxSize{1024};
33 ES_PROPERTY(enum=ReflectionUpdate, category=Quality, shown_when=quality:Custom, tooltip="Only the reflection capture; never limits the main scene frame rate.")
35 ES_PROPERTY(min=1, max=120, category=Quality, shown_when=update:FixedRate)
38 ES_PROPERTY(advanced)
41 bool enabled{true};
42};
43} // namespace esengine::ecs
Reflection and metadata system for automatic binding generation.
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
#define ES_ENUM(...)
Mark an enum that should be exposed to scripts.
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
Core type definitions and utilities for ESEngine.
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
std::uint8_t u8
Unsigned 8-bit integer.
Definition Types.hpp:41
float f32
32-bit floating point
Definition Types.hpp:59