|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
A shader's layout: std140 block (scalar/vector params) + texture sampler slots. More...
#include <MaterialStore.hpp>
Classes | |
| struct | Named |
Public Member Functions | |
| void | resolveNamed () |
| const MaterialParamSlot * | find (const std::string &name) const |
| const MaterialTextureSlot * | findTexture (const std::string &name) const |
Public Attributes | |
| u32 | blockSize = 0 |
| std::string | coverageParam |
| std::string | tipParam |
| The float param that turns the shader's blended tip pass on (see ParsedShader::tipParam). | |
| std::string | hairShadowParam |
| The float param that makes the shader's meshes hair for shadows (see ParsedShader::hairShadowParam). | |
| bool | usesGBuffer = false |
| The shader reads the scene's surface record (ParsedShader::usesGBuffer). | |
| bool | usesLights = false |
| The shader reads the frame's light block and shadow atlas (ParsedShader::usesLights). | |
| bool | highPrecision = false |
| The shader writes a measurement and wants a float target (ParsedShader::highPrecision). | |
| std::string | name |
| The shader's own name (#pragma shader "<name>"), for what a profiler calls a draw by. | |
| float | vertexBounds = 0.0f |
| bool | vertexHook = false |
| i32 | depthInputUnit = -1 |
| The tracked sampler of a deterministic vertex hook. | |
| std::vector< MaterialParamSlot > | params |
| std::vector< MaterialTextureSlot > | textures |
| struct esengine::MaterialUniformLayout::Named | named |
A shader's layout: std140 block (scalar/vector params) + texture sampler slots.
Definition at line 98 of file MaterialStore.hpp.
|
inline |
Definition at line 155 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindThrough(), esengine::PostProcessPipeline::cameraMotionWanted(), esengine::PostProcessPipeline::cloudShadowCaster(), and esengine::PostProcessPipeline::sceneCoverageWanted().
|
inline |
Definition at line 161 of file MaterialStore.hpp.
References name, and textures.
Referenced by esengine::MaterialStore::bindThrough(), esengine::PostProcessPipeline::drawProjectedMaterial(), and esengine::MaterialStore::layoutOf().
|
inline |
Resolves named from the names; called whenever params, textures or the special names change.
Definition at line 134 of file MaterialStore.hpp.
References coverageParam, hairShadowParam, name, named, params, textures, and tipParam.
Referenced by esengine::MaterialStore::registerLayout().
| u32 esengine::MaterialUniformLayout::blockSize = 0 |
Definition at line 99 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindThrough(), and esengine::MaterialStore::layoutOf().
| std::string esengine::MaterialUniformLayout::coverageParam |
The param whose value above zero makes output alpha coverage (see ParsedShader::coverageParam); empty when the shader declares none.
Definition at line 102 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf(), and resolveNamed().
| i32 esengine::MaterialUniformLayout::depthInputUnit = -1 |
The tracked sampler of a deterministic vertex hook.
Definition at line 120 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf().
| std::string esengine::MaterialUniformLayout::hairShadowParam |
The float param that makes the shader's meshes hair for shadows (see ParsedShader::hairShadowParam).
Definition at line 106 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf(), and resolveNamed().
| bool esengine::MaterialUniformLayout::highPrecision = false |
The shader writes a measurement and wants a float target (ParsedShader::highPrecision).
Definition at line 112 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf().
| std::string esengine::MaterialUniformLayout::name |
The shader's own name (#pragma shader "<name>"), for what a profiler calls a draw by.
Definition at line 114 of file MaterialStore.hpp.
Referenced by find(), findTexture(), esengine::MaterialStore::layoutOf(), resolveNamed(), and esengine::MaterialStore::shaderLabel().
| struct esengine::MaterialUniformLayout::Named esengine::MaterialUniformLayout::named |
Referenced by esengine::MaterialStore::alphaIsCoverage(), esengine::MaterialStore::castsCutoutShadow(), esengine::MaterialStore::hairShadowDensity(), esengine::MaterialStore::hasTipPass(), esengine::MaterialStore::needsScenePicture(), resolveNamed(), esengine::MaterialStore::usesSceneColor(), esengine::MaterialStore::usesSceneDepth(), and esengine::MaterialStore::usesScreenColor().
| std::vector<MaterialParamSlot> esengine::MaterialUniformLayout::params |
Definition at line 121 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindThrough(), find(), esengine::MaterialStore::layoutOf(), esengine::MaterialStore::paramValue(), and resolveNamed().
| std::vector<MaterialTextureSlot> esengine::MaterialUniformLayout::textures |
Definition at line 122 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::bindThrough(), findTexture(), esengine::MaterialStore::layoutOf(), and resolveNamed().
| std::string esengine::MaterialUniformLayout::tipParam |
The float param that turns the shader's blended tip pass on (see ParsedShader::tipParam).
Definition at line 104 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf(), and resolveNamed().
| bool esengine::MaterialUniformLayout::usesGBuffer = false |
The shader reads the scene's surface record (ParsedShader::usesGBuffer).
Definition at line 108 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf().
| bool esengine::MaterialUniformLayout::usesLights = false |
The shader reads the frame's light block and shadow atlas (ParsedShader::usesLights).
Definition at line 110 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf().
| float esengine::MaterialUniformLayout::vertexBounds = 0.0f |
What the shader's vertex hook can move a vertex by (ParsedShader::vertexBounds), and whether it has a hook at all — culling grows a mesh's box by the first, and the shadow pass builds a program of its own for the second.
Definition at line 118 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::layoutOf(), and esengine::MaterialStore::vertexBounds().
| bool esengine::MaterialUniformLayout::vertexHook = false |
Definition at line 119 of file MaterialStore.hpp.
Referenced by esengine::MaterialStore::hasVertexHook(), and esengine::MaterialStore::layoutOf().