Difference between revisions of "EffectShader"

1,054 bytes added ,  15:34, 25 January 2013
imported>Scornett
 
imported>Tox2ik
Line 8: Line 8:
The Membrane Shader is applied directly to the mesh of a target object. How the shader interacts with the mesh's base texture is determined in large part by the Source and Dest Blend Modes.
The Membrane Shader is applied directly to the mesh of a target object. How the shader interacts with the mesh's base texture is determined in large part by the Source and Dest Blend Modes.


*Blend Mode - enter the function for the source and destination pixels here.
**Zero - uses 0 as its pixel value
**One - uses 1 as its pixel value
**Source Alpha - RGB components of source pixel multiplied by alpha
**Source Inverted Alpha - RGB components of source pixel multiplied by 1 - alpha
**Source Color - Color of source pixel
**Source Inverse Color - Color of source pixel subtracted per component from white
**Dest Alpha - RGB components of destination pixel multiplied by alpha
**Dest Inverted Alpha - RGB components of destination pixel multiplied by 1 - alpha
**Dest Color - Color of destination pixel
**Dest Inverse Color - Color of destination pixel subtracted per component from white
**Source Alpha SAT - takes the lesser of the source pixel's alpha or one minus the destination pixel's alpha and places it in the red, green, and blue fields of the specified pixel. This mode sets the specified pixel's alpha to be 1.
*Blend Operation - determines how the source and destination functions are combined


::The default setting (Src = Source Alpha, Dst = Source Inverted Alpha, Op = Add) should work for most shaders, as it resembles typical alpha blending.
'''Source and Dest Blend Mode'''
::For brightening try this setting: Src = One, Dst = One, Op = Add
::For modulation (i.e. multiplying over the existing texture) try this: Src = Dest Color, Dst = Zero, Op = Add


*Z Test Funtion - defaults to Equal To. If changed to Greater Than or Greater Than or Equal To, the membrane shader will be displayed on top of other geometry and will be visible through walls.
Select the functions for the source and destination pixels here.


The Fill/Texture Effect section determines the properties of the Fill color or texture.
''Zero''
:: Uses 0 as its pixel value


''All time values are in seconds''
''One''
:: Uses 1 as its pixel value


*Affect Skin Only - check this box to make the Membrane Shader only affect NPC's exposed skin. E.g. the effectSunDamage shader uses this.
''Source Alpha''
:: RGB components of source pixel multiplied by alpha


*Alpha Fade In Time - the time the fill effect takes to reach its Full Alpha Ratio value.
''Source Inverted Alpha''
*Full Alpha Time - the duration the fill effect stays at the Full Alpha Ratio.
:: RGB components of source pixel multiplied by 1 - alpha
*Alpha Fade Out Time - the time the fill effect takes to reach its Persistant Alpha Ratio.
*Full Alpha Ratio - the alpha amount of the fill effect. A value of 1 would be completely opaque.
*Persistent Alpha Ratio - the alpha amount of the persistent fill effect. The persistent effect will last for as long as the effect shader is active. For a persistent effect to be visible, the FX Persist flag should be checked on in the [[Magic Effects]] window.
*Alpha Pulse Amplitude - how noticable the "pulsing" of the shader is.
*Alpha Pulse Frequency - how often the shader is "pulsed". It may be easier to consider that the period of any given pulse would be 1 second divided by the frequency of the pulses.
*Texture Animation Speed - if a texture is selected, it can be animated across the U and V texture coordinates using these speed values.
*Color - the color of the fill effect if a texture is not selected.
*Texture - press the Edit button to add a texture instead of using a solid color. To remove an image file, press this button and cancel the dialogue window that appears.


The Edge Effect is an effect that applies a kind of rim lighting to the mesh.
''Source Color''
:: Color of source pixel


Refer to the Fill/Texture Effect section for the majority of the settings.
''Source Inverse Color''
*Fall Off - This value represents the bias of the rim lighting. A higher value will cause the rim effect to fall off quicker, giving it a sharper outline.
:: Color of source pixel subtracted per component from white


*Inverse - Check this box to make the edge effect's blend mode inverted relative to the fill effect. For example, when using additive fill effect, checking this box will cause the edge effect to darken rather than lighten the mesh.
''Dest Alpha''
:: RGB components of destination pixel multiplied by alpha
 
''Dest Inverted Alpha''
:: RGB components of destination pixel multiplied by 1 - alpha
 
''Dest Color''
:: Color of destination pixel
 
''Dest Inverse Color''
:: Color of destination pixel subtracted per component from white
 
''Source Alpha SAT''
:: Takes the lesser of the source pixel's alpha or one minus the destination pixel's alpha and places it in the red, green, and blue fields of the specified pixel. This mode sets the specified pixel's alpha to be 1.
 
 
'''Blend Operation'''
 
This option determines how the source and destination functions are combined.
 
The default setting should work for most shaders, as it resembles typical alpha blending;
* Source Blend Mode:'' Source Alpha ''
* Dest Blend Mode:'' Source Inverted Alpha ''
* Blend Operation:'' Add ''
 
To make something brighter, try these options;
* Source Blend Mode:'' One ''
* Dest Blend Mode:'' One ''
* Blend Operation:'' Add ''
 
For modulation (i.e. multiplying over the existing texture) try this;
* Source Blend Mode:'' Dest Color ''
* Dest Blend Mode:'' Zero ''
* Blend Operation:'' Add ''
 
 
'''Z Test Function'''
 
Defaults to Equal To. If changed to Greater Than or Greater Than or Equal To, the membrane shader will be displayed on top of other geometry and will be visible through walls (unconfirmed).
 
==== Fill / Texture Effect ====
Determines the properties of the fill color or texture. All time values in this frame are in seconds.
 
''Affect Skin Only''
:: Check this box to make the Membrane Shader only affect NPC's exposed skin. E.g. the effectSunDamage shader uses this.
 
''Alpha Fade In Time''
:: The time the fill effect takes to reach its Full Alpha Ratio value.
 
''Full Alpha Time''
:: The duration the fill effect stays at the Full Alpha Ratio.
 
''Alpha Fade Out Time''
:: The time the fill effect takes to reach its Persistant Alpha Ratio.
 
''Full Alpha Ratio''
:: The alpha amount of the fill effect. A value of 1 would be completely opaque.
 
''Persistent Alpha Ratio''
:: The alpha amount of the persistent fill effect. The persistent effect will last for as long as the effect shader is active. For a persistent effect to be visible, the FX Persist flag should be checked on in the [[Magic Effects]] window.
 
''Alpha Pulse Amplitude''
:: How noticable the "pulsing" of the shader is.
 
''Alpha Pulse Frequency''
:: How often the shader is "pulsed". It may be easier to consider that the period of any given pulse would be 1 second divided by the frequency of the pulses.
 
''Texture Animation Speed''
:: If a texture is selected, it can be animated across the U and V texture coordinates using these speed values.
 
''Color''
:: The color of the fill effect if a texture is not selected.
 
''Texture''
:: Press the Edit button to add a texture instead of using a solid color. To remove an image file, press this button and cancel the dialogue window that appears.
 
==== Edge Effect ====
Applies a light rim of sorts to the outer edge of the mesh. Refer to the Fill / Texture Effect section for the majority of the settings.
 
''Fall Off''
::This value represents the bias of the rim lighting. A higher value will cause the rim effect to fall off quicker, giving it a sharper outline.
 
''Inverse''
:: Check this box to make the edge effect's blend mode inverted relative to the fill effect. For example, when using additive fill effect, checking this box will cause the edge effect to darken rather than lighten the mesh.
 
==== Holes ====
Holes are used to define a dissolve for the object the Effect Shader is on. These were used in Skyrim for when Actors dissolve when killed with Lightning. This is done by animating the alpha cut off on a grayscale image. This is often used in conjunction with a Fill/Texture Effect.
 
''texture input box''
:: Select a .dds file to be used for this effect
 
'''Alpha Test Animation'''
 
''Start Time''
:: How long after applying the Effect Shader should the dissolve start.
 
''End Time''
:: How long after applying the Effect Shader should the dissolve end.
 
''Start Val''
:: The black value that is cut off at the start.
 
''End Val''
:: The black value that is cut off at the end.


==Holes==
==Holes==
Anonymous user