effect-format.runtime.state-and-metadata |
Runtime artifact pair |
RenderEffect loads the baked .fofx source for pass/render state and one .fofx-N-info artifact per pass for reflected resource positions. |
Changing only a shader binary cannot change pass count or blend/depth state. |
Source/Frontend/Rendering.cpp |
effect-format.runtime.cache-key |
Path-only effect cache |
EffectManager caches one mutable RenderEffect object per resource path. Re-loading the same path returns the existing object. |
ScriptValueBuf and per-frame optional buffers belong to the cached object, not to an effect slot. |
Source/Client/EffectManager.cpp |
effect-format.runtime.first-usage |
First-load EffectUsage |
The first load of a path fixes that RenderEffect object’s EffectUsage. Do not reuse one path across incompatible ImGui, QuadSprite, Primitive, or Model usage categories. |
The cache key omits EffectUsage and later loads return the first object without rebuilding its vertex layout or pipeline assumptions. |
Source/Client/EffectManager.cpp, Source/Frontend/Rendering.h |
effect-format.runtime.script-value-lifetime |
ScriptValue persistence |
An effect declaring ScriptValueBuf receives a zeroed buffer on first load. Values persist on the cached path until overwritten or explicitly cleared; SetEffect does not clear them. |
Switching to another path selects another object’s buffer, while switching back to a previously loaded path restores that object’s prior values. |
Source/Client/EffectManager.cpp, Source/Client/Client.cpp |
effect-format.runtime.script-value-target |
Script-value target resolution |
Script writes resolve the currently selected effect for one EffectType/subtype, require it to be loaded, and require that it declares ScriptValueBuf. |
Writing a slot on a passthrough/default effect without ScriptValueBuf is a script error. |
Source/Client/Client.cpp |
effect-format.runtime.per-frame-update |
Per-frame buffer updates |
Every loaded effect is visited each frame; TimeBuf and RandomValueBuf are allocated/refreshed only when reflection marks them as needed. |
Declaring a built-in buffer opts the effect into its Engine producer. |
Source/Client/EffectManager.cpp |
effect-format.runtime.default-selection |
Default effect resolution |
An empty SetEffect path resolves back to the slot’s default effect; a non-empty path loads it using the default effect’s EffectUsage. |
Projects can temporarily override a slot and restore the Engine/project default without naming its path. |
Source/Client/EffectManager.cpp |