<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FImageFadeFx</id>
	<title>HPL3/SOMA/Scripting/ImageFadeFx - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FScripting%2FImageFadeFx"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/ImageFadeFx&amp;action=history"/>
	<updated>2026-10-04T04:28:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/ImageFadeFx&amp;diff=7271&amp;oldid=prev</id>
		<title>TiMan: Add a sourced SOMA guide with explanations and stock-script examples.</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Scripting/ImageFadeFx&amp;diff=7271&amp;oldid=prev"/>
		<updated>2026-10-02T12:23:28Z</updated>

		<summary type="html">&lt;p&gt;Add a sourced SOMA guide with explanations and stock-script examples.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{shortPageTitle}}&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
This page describes SOMA’s ImageFadeFx effect.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Typed interface ==&lt;br /&gt;
The methods are declared in &amp;lt;code&amp;gt;script/effects/Effects.hps&amp;lt;/code&amp;gt; on &amp;lt;code&amp;gt;iScrEffect_ImageFadeFX&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void SetTextures(const tString&amp;amp; in asFadeTexture, const tString&amp;amp; in asColorTexture, const tString&amp;amp; in asOffsetTexture);&lt;br /&gt;
void SetAmount(float afAmount);&lt;br /&gt;
void FadeAmount(float afAmount, float afTime);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Read the texture and fade controls ==&lt;br /&gt;
# Trace &amp;lt;code&amp;gt;SetTextures&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;script/effects/Effect_ImageFadeFX.hps&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
# Follow &amp;lt;code&amp;gt;SetAmount&amp;lt;/code&amp;gt;: 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.&lt;br /&gt;
# Follow &amp;lt;code&amp;gt;FadeAmount&amp;lt;/code&amp;gt;: for a positive &amp;lt;code&amp;gt;afTime&amp;lt;/code&amp;gt;, the change speed is &amp;lt;code&amp;gt;abs(target - current) / afTime&amp;lt;/code&amp;gt;; otherwise it calls &amp;lt;code&amp;gt;SetAmount&amp;lt;/code&amp;gt; immediately.&lt;br /&gt;
&lt;br /&gt;
== Still to expand ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[HPL3/SOMA/Scripting/Effects Helper|SOMA effects helpers]]&lt;br /&gt;
&lt;br /&gt;
[[Category:English]]&lt;/div&gt;</summary>
		<author><name>TiMan</name></author>
		
	</entry>
</feed>