Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
Environment.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
7#pragma once
8
9#include "../core/Types.hpp"
10#include "../math/Math.hpp"
11#include "./Handle.hpp"
12
13#include <array>
14
15namespace esengine {
16
26public:
27 std::array<glm::vec3, 9> irradiance{};
28
30
34
36 f32 faceSize = 0.0f;
39 f32 maxRange = 0.0f;
40
46
51 bool hasSun = false;
53 glm::vec3 sunDirection{0.0f, 1.0f, 0.0f};
56 glm::vec3 sunColor{0.0f};
58 std::array<glm::vec3, 9> skyIrradiance{};
59
60 bool hasSpecular() const { return specular.isValid() && mipCount > 0 && faceSize > 0.0f; }
61};
62
63} // namespace esengine
Type-safe resource handle system.
Math utilities and GLM configuration for ESEngine.
Core type definitions and utilities for ESEngine.
The two halves of an image-based light, as the importer baked them.
resource::TextureHandle sky
The panorama the sky is drawn from: equirectangular, row 0 up, RGBM under maxRange....
u32 columns
How many octahedral pyramids stand side by side in the atlas.
bool hasSpecular() const
bool hasSun
The sun the importer found in the panorama: the one compact source a directional light can stand in f...
std::array< glm::vec3, 9 > irradiance
std::array< glm::vec3, 9 > skyIrradiance
resource::TextureHandle specular
Handle< esengine::Texture > TextureHandle
Handle to a texture resource.
Definition Handle.hpp:217
std::uint32_t u32
Unsigned 32-bit integer.
Definition Types.hpp:45
float f32
32-bit floating point
Definition Types.hpp:59