SpriteCard
Jump to navigation
Jump to search

This article or section needs to be cleaned up to conform to a higher standard of quality because:
This article is not written like other shader pages, is full of untested parameters, and lacks new parameters from newer engine branches.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
This article or section needs to be updated to include current information regarding the subject.
Remember to check for any notes left by the tagger at this article's talk page.
Remember to check for any notes left by the tagger at this article's talk page.
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-screen 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.
$maxdistance <float>
- Maximum number of units within which this particle will be visible (default = 100,000). Can be overwritten by a particle system.
$farfadeinterval <float>
- Number of units over which a particle should fade (default = 400). If this is higher than
$maxdistance
, the particle will never reach full opacity. $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 <normal>
- Allows an HDR-like factor to be 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>
(DX9 SM2)$depthblendscale <float>
(DX9 SM2)- 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
$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 <texture>
(DX9 SM2)- 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.