|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
Where a MeshRenderer's BAKED light comes from: the atlas, and the rectangle of it this object occupies. More...
#include <MeshRenderer.hpp>
Public Member Functions | |
| MeshLightmap ()=default | |
Public Attributes | |
| resource::TextureHandle | lightmap |
| The baked atlas. Invalid = this object has no bake, which is not the same as a black one: it keeps the light it gets in real time. | |
| glm::vec4 | scaleOffset {1.0f, 1.0f, 0.0f, 0.0f} |
| Where in the atlas: xy scales the mesh's second UV, zw offsets it. (1,1,0,0) reads the whole texture, which is what a bake of a single object produces. | |
Where a MeshRenderer's BAKED light comes from: the atlas, and the rectangle of it this object occupies.
Per ENTITY and not part of the mesh because of the rectangle: one mesh placed twice is lit twice, in two patches of one atlas. Needs a mesh carrying TexCoord1 — one without draws as before.
Definition at line 259 of file MeshRenderer.hpp.
|
default |
| resource::TextureHandle esengine::ecs::MeshLightmap::lightmap |
The baked atlas. Invalid = this object has no bake, which is not the same as a black one: it keeps the light it gets in real time.
Definition at line 263 of file MeshRenderer.hpp.
Referenced by meshlightmapApplyJS(), and meshlightmapToJS().
| glm::vec4 esengine::ecs::MeshLightmap::scaleOffset {1.0f, 1.0f, 0.0f, 0.0f} |
Where in the atlas: xy scales the mesh's second UV, zw offsets it. (1,1,0,0) reads the whole texture, which is what a bake of a single object produces.
Definition at line 269 of file MeshRenderer.hpp.
Referenced by meshlightmapApplyJS(), and meshlightmapToJS().