64 std::vector<DrawParamSlot>
slots;
Core type definitions and utilities for ESEngine.
DrawParamType
GLSL type of one lifted uniform (the subset the rewriter supports).
constexpr u32 DRAW_PARAMS_FALLBACK_SIZE
Size of the zeroed fallback UBO RenderContext binds at DRAW_PARAMS_BINDING each frame.
std::uint32_t u32
Unsigned 32-bit integer.
DrawParamsRewrite rewriteLooseUniforms(const std::string &vertexSrc, const std::string &fragmentSrc)
Lifts loose non-sampler uniform declarations out of both stages into one shared std140 DrawParams blo...
std::uint8_t u8
Unsigned 8-bit integer.
constexpr const char * DRAW_PARAMS_BLOCK
GLSL block name; must match the rewriter's generated block + Shader::compile lookup.
constexpr u32 DRAW_PARAMS_BINDING
Indexed UBO binding point for the per-draw DrawParams block. (0 = FrameConstants, 1 = MaterialConstan...
void drawParamSizeAlign(DrawParamType t, u32 &size, u32 &align)
std140 size/base-alignment of a supported param type.
One lifted uniform's slot in a shader's std140 DrawParams block.
u32 offset
std140 byte offset within the block.
A shader's DrawParams layout: lifted members + 16-aligned block size.
const DrawParamSlot * find(const std::string &name) const
u32 blockSize
0 ⇒ the shader has no DrawParams block.
std::vector< DrawParamSlot > slots
Result of rewriteLooseUniforms; layout.empty() ⇒ sources unchanged.