|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
A material's resolved render state (P0) plus its packed std140 constants (P1). More...
#include <MaterialStore.hpp>
Public Attributes | |
| resource::ShaderHandle | shaderRef |
| u32 | shader = 0 |
| Program id; 0 means "use the path's default batch shader". | |
| BlendMode | blend = BlendMode::Normal |
| bool | depthTest = false |
| bool | depthWrite = true |
| CullMode | cull = CullMode::None |
| i16 | depthBias = 0 |
| std::vector< u8 > | uboBytes |
| BufferHandle | ubo = BufferHandle::Invalid |
| bool | uboDirty = false |
| std::vector< MaterialTextureBinding > | textures |
| Texture params bound to sampler units, by handle (see MaterialTextureBinding). | |
| u64 | revision = 0 |
| Changes whenever anything above does, or its shader's layout: see core/Revision.hpp and MaterialStore::revisionOf. | |
A material's resolved render state (P0) plus its packed std140 constants (P1).
Definition at line 172 of file MaterialStore.hpp.
| BlendMode esengine::MaterialRecord::blend = BlendMode::Normal |
Definition at line 178 of file MaterialStore.hpp.
Referenced by esengine::draw_meshWithMaterial(), and esengine::material_define().
| CullMode esengine::MaterialRecord::cull = CullMode::None |
Definition at line 181 of file MaterialStore.hpp.
Referenced by esengine::draw_meshWithMaterial(), and esengine::material_define().
| i16 esengine::MaterialRecord::depthBias = 0 |
Depth-buffer units toward the eye — what a surface laid ON another one says so it wins.
Definition at line 184 of file MaterialStore.hpp.
Referenced by esengine::material_define().
| bool esengine::MaterialRecord::depthTest = false |
Definition at line 179 of file MaterialStore.hpp.
Referenced by esengine::MeshPlugin::collect(), esengine::draw_meshWithMaterial(), and esengine::material_define().
| bool esengine::MaterialRecord::depthWrite = true |
Definition at line 180 of file MaterialStore.hpp.
Referenced by esengine::draw_meshWithMaterial(), and esengine::material_define().
| u64 esengine::MaterialRecord::revision = 0 |
Changes whenever anything above does, or its shader's layout: see core/Revision.hpp and MaterialStore::revisionOf.
Definition at line 196 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::define(), esengine::MaterialStore::revisionOf(), esengine::MaterialStore::setUniform(), and esengine::MaterialStore::setWorldUnitsPerMeter().
| u32 esengine::MaterialRecord::shader = 0 |
Program id; 0 means "use the path's default batch shader".
Definition at line 177 of file MaterialStore.hpp.
Referenced by esengine::draw_meshWithMaterial(), esengine::material_define(), and esengine::RenderFrame::submitSkeletalBatch().
| resource::ShaderHandle esengine::MaterialRecord::shaderRef |
The identity: what the layout is filed under, and what survives the program being rebuilt. shader below caches what it currently resolves to, because the collect path reads that per entity.
Definition at line 176 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::alphaIsCoverage(), esengine::MaterialStore::bindForDraw(), esengine::MaterialStore::bindThrough(), esengine::MaterialStore::castsCutoutShadow(), esengine::MaterialStore::define(), esengine::draw_meshWithMaterial(), esengine::MaterialStore::hairShadowDensity(), esengine::MaterialStore::hasTipPass(), esengine::MaterialStore::hasVertexHook(), esengine::material_define(), esengine::MaterialStore::meshProgram(), esengine::MaterialStore::needsScenePicture(), esengine::MaterialStore::prepassCoverageProgram(), esengine::MaterialStore::setUniform(), esengine::MaterialStore::setWorldUnitsPerMeter(), esengine::MaterialStore::shaderLabel(), esengine::MaterialStore::shaderOf(), esengine::MaterialStore::shadowProgram(), esengine::MaterialStore::usesSceneColor(), esengine::MaterialStore::usesSceneDepth(), esengine::MaterialStore::usesScreenColor(), and esengine::MaterialStore::vertexBounds().
| std::vector<MaterialTextureBinding> esengine::MaterialRecord::textures |
Texture params bound to sampler units, by handle (see MaterialTextureBinding).
Definition at line 193 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindForDraw(), esengine::MaterialStore::bindThrough(), and esengine::MaterialStore::define().
| BufferHandle esengine::MaterialRecord::ubo = BufferHandle::Invalid |
Definition at line 189 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindForDraw(), and esengine::MaterialStore::define().
| std::vector<u8> esengine::MaterialRecord::uboBytes |
Packed std140 MaterialConstants payload (sized to the shader's blockSize), the GPU UBO it uploads to (lazy), and whether the bytes changed since the last upload.
Definition at line 188 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindForDraw(), esengine::MaterialStore::bindThrough(), esengine::MaterialStore::define(), esengine::MaterialStore::paramValue(), esengine::MaterialStore::setUniform(), and esengine::MaterialStore::setWorldUnitsPerMeter().
| bool esengine::MaterialRecord::uboDirty = false |
Definition at line 190 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindForDraw(), esengine::MaterialStore::define(), esengine::MaterialStore::setUniform(), and esengine::MaterialStore::setWorldUnitsPerMeter().