ImageFadeFx
< HPL3 | SOMA | Scripting(Redirected from HPL3/Scripting/ImageFadeFx)
Jump to navigation
Jump to search
|
This article or section is a stub. You can help by adding to it. |
This page describes SOMA’s ImageFadeFx effect.
ImageFadeFX is a post effect with separate fade, color and offset textures. SetTextures loads those three texture slots; FadeAmount computes a change speed from the target amount and fade duration, or sets the amount immediately when the duration is nonpositive.
Typed interface
The methods are declared in script/effects/Effects.hps on iScrEffect_ImageFadeFX:
void SetTextures(const tString& in asFadeTexture, const tString& in asColorTexture, const tString& in asOffsetTexture);
void SetAmount(float afAmount);
void FadeAmount(float afAmount, float afTime);
Read the texture and fade controls
- Trace
SetTexturesinscript/effects/Effect_ImageFadeFX.hps: the arguments fill slots 0, 1 and 2 in fade, color and offset order. Each nonempty filename is loaded as a 2D texture. A failed load produces an error and clears that slot’s filename. - Follow
SetAmount: it creates or retrieves the post effect, applies the amount and texture slots, and makes the script effect active when the amount is greater than zero. - Follow
FadeAmount: for a positiveafTime, the change speed isabs(target - current) / afTime; otherwise it callsSetAmountimmediately.
Still to expand
The texture-loading and amount controls are verified, but no shipped campaign caller was found. A complete texture set and a verified visual example are still needed.