SpriteCard: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) (soft particles) |
TomEdwards (talk | contribs) (just realised that all shader params are documented in the source code!) |
||
Line 15: | Line 15: | ||
;<code>$depthblendscale <float></code> | ;<code>$depthblendscale <float></code> | ||
: Enables soft particle rendering. This uses the [[depth buffer]] to reduce the harsh edges otherwise seen when a particle sprite intersects 3D geometry. | : Enables soft particle rendering. This uses the [[depth buffer]] to reduce the harsh edges otherwise seen when a particle sprite intersects 3D geometry. | ||
: <code>$depthblend</code> enables the effect, while <code>$depthblendscale</code> determines the extent to which the particles should be softened: low values soften less but lead to visible color banding along edges, while high values | : <code>$depthblend</code> enables the effect, while <code>$depthblendscale</code> (default = 50) determines the extent to which the particles should be softened: low values soften less but lead to visible color banding along edges, while high values soften more but lead to very obvious opacity falloff. {{note|The depth blend effect is limited by the very short 128-unit range of the depth buffer. Beyond this distance, it has no effect.}} | ||
== Untested params == | |||
; <code>$farfadeinterval</code> | |||
: Interval over which to fade out far away particle. | |||
; <code>$dualsequence <bool></code> | |||
: Blend two separate animated sequences | |||
; <code>$sequence_blend_mode <choices></code> | |||
: Defines the blend mode between the images in dual sequence particles. 0 = avg, 1=alpha from first, rgb from 2nd, 2= first over second | |||
; <code>$maxlumframeblend1</code> | |||
; <code>$maxlumframeblend2</code> | |||
: Instead of blending between animation frames for the first/second sequence, select pixels based upon max luminance. | |||
; <code>$zoomanimateseq2 <[[normal]]></code> | |||
: Amount to gradually zoom between frames on the second sequence. 2.0 will double the size of a frame over its lifetime. | |||
; <code>$ramptexture <bool></code> | |||
: If specified, then the red value of the image is used to index this ramp to produce the output color. | |||
; <code>$extractgreenalpha <bool></code> | |||
: Grayscale data sitting in green/alpha channels. | |||
; <code>$addoverblend <bool></code> | |||
: Use ONE:INVSRCALPHA blending | |||
; <code>$addself <[[float]]></code> | |||
: Amount of base texture to additively blend in. | |||
; <code>$splinetype</code> | |||
: Spline type. 0 = none, 1=ctamull rom. Disables instancing. | |||
; <code>$useinstancing <bool></code> | |||
: Whether to use GPU vertex instancing. Xbox 360 only. | |||
[[Category:Shaders]] | [[Category:Shaders]] | ||
[[Category:List of Shader Parameters]] | [[Category:List of Shader Parameters]] | ||
[[Category:List of Shaders]] | [[Category:List of Shaders]] |
Revision as of 10:09, 3 May 2010
The SpriteCard shader is for materials that will be used with Source's particle system. It supports the unusual animation frame storage of Source's particles (see Animated Particles), and also provides the following unique parameters:
$minsize <normal>
$maxsize <normal>
A minimum/maximum on-scree
n size for a particle. It will never go over/under the specified value.Todo: What if it's in a rendertarget?Tip:$minsize is good for ensuring that effects like bloodspray are visible at a distance.
$minfadesize <normal>
$maxfadesize <normal>
- Causes a particle to begin (min) and end (max) fading out based on its on-screen size. Both params are required.
Tip:Good for controlling performance when walking through a cloud of large particles.
$blendframes <bool>
- By default animated textures blend between any given two animation frames to increase the apparent animation rate. In translucent materials this adds additional overdraw to the scene, however. Disabling frame blend will trade the animation smoothing for performance.
$overbrightfactor <float>
- Allows a HDR like factor applied to the sprite. The base value is 0, where 1.0 would make it nearly two times as bright. This value can help make sprites like fire, and light glows feel more realistic.
$depthblend <bool>
$depthblendscale <float>
- Enables soft particle rendering. This uses the depth buffer to reduce the harsh edges otherwise seen when a particle sprite intersects 3D geometry.
$depthblend
enables the effect, while$depthblendscale
(default = 50) determines the extent to which the particles should be softened: low values soften less but lead to visible color banding along edges, while high values soften more but lead to very obvious opacity falloff.Note:The depth blend effect is limited by the very short 128-unit range of the depth buffer. Beyond this distance, it has no effect.
Untested params
$farfadeinterval
- Interval over which to fade out far away particle.
$dualsequence <bool>
- Blend two separate animated sequences
$sequence_blend_mode <choices>
- Defines the blend mode between the images in dual sequence particles. 0 = avg, 1=alpha from first, rgb from 2nd, 2= first over second
$maxlumframeblend1
$maxlumframeblend2
- Instead of blending between animation frames for the first/second sequence, select pixels based upon max luminance.
$zoomanimateseq2 <normal>
- Amount to gradually zoom between frames on the second sequence. 2.0 will double the size of a frame over its lifetime.
$ramptexture <bool>
- If specified, then the red value of the image is used to index this ramp to produce the output color.
$extractgreenalpha <bool>
- Grayscale data sitting in green/alpha channels.
$addoverblend <bool>
- Use ONE:INVSRCALPHA blending
$addself <float>
- Amount of base texture to additively blend in.
$splinetype
- Spline type. 0 = none, 1=ctamull rom. Disables instancing.
$useinstancing <bool>
- Whether to use GPU vertex instancing. Xbox 360 only.