<?xml version="1.0" encoding="utf-8"?>
<CustomShader version="3">
    <LodLevel startDistance="0">
        <CodeInjections>
            <CodeInjection position="VS_OUTPUT">
<![CDATA[
float mFlickering : TEXCOORDn;
]]>
            </CodeInjection>
            <CodeInjection position="VS_END">
<![CDATA[
    // slower blinking + variation to achieve different ratio between on and off state
    Out.mFlickering = clamp( cos( 7.0 * cTime_s ) + 0.2, 0, 1 );
]]>
            </CodeInjection>
            <CodeInjection position="EMISSIVE_FS">
<![CDATA[
#if defined( ALPHA_BLENDED )
    emissiveColor.rgb  = tex2D( emissiveMap, In.vs.GLOSSMAP_TEXCOORD).rgba * In.vs.mFlickering;
#endif
]]>
            </CodeInjection>
            <CodeInjection position="FINAL_POS_FS">
<![CDATA[
#if defined(ALPHA_BLENDED)
    oColor.a = 0.0f; // additive blending
#endif
]]>
            </CodeInjection>
        </CodeInjections>
    </LodLevel>
</CustomShader>