Pyro vision (shader): Difference between revisions
Jump to navigation
Jump to search
m ({{cleanup}}) |
(Formatting) |
||
Line 1: | Line 1: | ||
The pyro_vision shader is used in pyro_vision in the game Team Fortress 2. It is used to replace the normal textures of a map with a simulation similar to the fantasy land shown in the animated short "Meet the Pyro". | The pyro_vision shader is used in pyro_vision in the game Team Fortress 2. It is used to replace the normal textures of a map with a simulation similar to the fantasy land shown in the animated short "Meet the Pyro". | ||
To do so it computes the grayscale value of the diffuse color of the original texture and maps it using a special one dimensional texture. It can also project an overlay texture, usually stripes, uniformly in world space. | To do so it computes the grayscale value of the diffuse color of the original texture and maps it using a special one dimensional texture. It can also project an overlay texture, usually stripes, uniformly in world space. | ||
Recommended Reading: [[http://www.teamfortress.com/post.php?id=8502 Dreams of Chronic and Sustained Cruelty]] | |||
The Pyro vision shader has 4 effect modes controlled by $EFFECT | The Pyro vision shader has 4 effect modes controlled by $EFFECT | ||
0 | {| class=standard-table | ||
1 | | 0 || An R&D stage which is not finished | ||
2 | |- | ||
3 | | 1 || Handles most of the world and model rendering in pyro land | ||
|- | |||
| 2 || Depth of Field blending | |||
|- | |||
| 3 || Pyro vignette drawing | |||
|} | |||
Standard Fields found in other shaders: | Standard Fields found in other shaders: | ||
$BASETEXTURE | {| class=standard-table | ||
Your diffuse texture | | $BASETEXTURE || "" || Your diffuse texture | ||
|- | |||
| $BASETEXTURE2 || "" || Second diffuse texture - For two way blends | |||
$BASETEXTURE2 | |- | ||
Second diffuse texture | | $BLENDMODULATETEXTURE || "" || Optional modulate texture - For two way blends | ||
|- | |||
$BLENDMODULATETEXTURE | | $BLENDMASKTRANSFORM || "center .5 .5 scale 1 1 rotate 0 translate 0 0" || The transform parameters for blending | ||
Optional modulate texture | |} | ||
$BLENDMASKTRANSFORM | |||
The transform parameters for blending | |||
General Fields: | General Fields: | ||
$EFFECT | {| class=standard-table | ||
Used to specify the effect type. | | $EFFECT || 1 || Used to specify the effect type. | ||
|- | |||
$VERTEX_LIT | | $VERTEX_LIT || 0 || 0 if lightmap based, 1 if vertex lit based | ||
0 if lightmap based, 1 if vertex lit based | |} | ||
Effect #1 Fields | Effect #1 Fields | ||
$DIFFUSE_BASE | {| class=standard-table | ||
Value from 0.0 to 1.0 to blend the diffuse towards solid white | | $DIFFUSE_BASE || 0.0 || Value from 0.0 to 1.0 to blend the diffuse towards solid white | ||
|- | |||
$DIFFUSE_WHITE | | $DIFFUSE_WHITE || 0.0 || Value from 0.0 to 1.0 to blend the lightmap towards solid white | ||
Value from 0.0 to 1.0 to blend the lightmap towards solid white | |- | ||
| $GRAY_POWER || 1.0 || Raises the gray scale result to this value | |||
$GRAY_POWER | |- | ||
Raises the gray scale result to this value | | $GRAY_STEP || "[ 0.0 1.0 ]" || Peforms a smooth step between the two values supplied. Think of this as the min/max sliders on a histogram chart. | ||
|- | |||
$GRAY_STEP | | $LIGHTMAP_GRADIENTS || 255.0 || Values from 1.0 to 255.0. Downscales the result into this many categories. May be provide some cartooning effects if you use low values. | ||
Peforms a smooth step between the two values supplied. Think of this as the min/max sliders on a histogram chart. | |- | ||
| $COLORBAR || "" || Specifies a 1D Texture. The resultant gray scale is used as a texture coordinate into this image to get the final color. We generally used the image as a color gradient, but try different patterns or smoothness of gradients for different results. | |||
$LIGHTMAP_GRADIENTS | |- | ||
Values from 1.0 to 255.0. Downscales the result into this many categories. May be provide some cartooning effects if you use low values. | | $SELFILLUMTINT || "[ 1.0 1.0 1.0 ]" || If self illumination is specified, this is the tint color for the self illumination. | ||
|} | |||
$COLORBAR | |||
Specifies a 1D Texture. The resultant gray scale is used as a texture coordinate into this image to get the final color. We generally used the image as a color gradient, but try different patterns or smoothness of gradients for different results. | |||
$SELFILLUMTINT | |||
If self illumination is specified, this is the tint color for the self illumination. | |||
Optional Stripes | Optional Stripes | ||
$STRIPETEXTURE | {| class=standard-table | ||
| $STRIPETEXTURE || "" || The texture used to specify the stripe or any other pattern. It uses standard alpha translucency to blend this texture. | |||
|- | |||
$STRIPE_SCALE | | $STRIPE_SCALE || "[ 0.002 0.002 0.2 ]" || Specifies the x y z world scaling to compute the seamless texture coordinate of the stripe texture. | ||
|- | |||
| $STRIPE_COLOR || "[ 1.0 1.0 1.0 ]" || The color modulated against the strip texture’s RGB. If you make your strip texture as gray scale, then you can have greater color control by using this field, as well as only needing one texture to create many colors. | |||
$STRIPE_COLOR | |- | ||
| $STRIPE_LM_SCALE || 0.0 || Interpolates between the lighting intensity of the pixel to full bright based upon this value. | |||
$STRIPE_LM_SCALE | |||
[[Category:Shaders]] | [[Category:Shaders]] |
Revision as of 09:31, 8 August 2013
The pyro_vision shader is used in pyro_vision in the game Team Fortress 2. It is used to replace the normal textures of a map with a simulation similar to the fantasy land shown in the animated short "Meet the Pyro".
To do so it computes the grayscale value of the diffuse color of the original texture and maps it using a special one dimensional texture. It can also project an overlay texture, usually stripes, uniformly in world space.
Recommended Reading: [Dreams of Chronic and Sustained Cruelty]
The Pyro vision shader has 4 effect modes controlled by $EFFECT
0 | An R&D stage which is not finished |
1 | Handles most of the world and model rendering in pyro land |
2 | Depth of Field blending |
3 | Pyro vignette drawing |
Standard Fields found in other shaders:
$BASETEXTURE | "" | Your diffuse texture |
$BASETEXTURE2 | "" | Second diffuse texture - For two way blends |
$BLENDMODULATETEXTURE | "" | Optional modulate texture - For two way blends |
$BLENDMASKTRANSFORM | "center .5 .5 scale 1 1 rotate 0 translate 0 0" | The transform parameters for blending |
General Fields:
$EFFECT | 1 | Used to specify the effect type. |
$VERTEX_LIT | 0 | 0 if lightmap based, 1 if vertex lit based |
Effect #1 Fields
$DIFFUSE_BASE | 0.0 | Value from 0.0 to 1.0 to blend the diffuse towards solid white |
$DIFFUSE_WHITE | 0.0 | Value from 0.0 to 1.0 to blend the lightmap towards solid white |
$GRAY_POWER | 1.0 | Raises the gray scale result to this value |
$GRAY_STEP | "[ 0.0 1.0 ]" | Peforms a smooth step between the two values supplied. Think of this as the min/max sliders on a histogram chart. |
$LIGHTMAP_GRADIENTS | 255.0 | Values from 1.0 to 255.0. Downscales the result into this many categories. May be provide some cartooning effects if you use low values. |
$COLORBAR | "" | Specifies a 1D Texture. The resultant gray scale is used as a texture coordinate into this image to get the final color. We generally used the image as a color gradient, but try different patterns or smoothness of gradients for different results. |
$SELFILLUMTINT | "[ 1.0 1.0 1.0 ]" | If self illumination is specified, this is the tint color for the self illumination. |
Optional Stripes
$STRIPETEXTURE | "" | The texture used to specify the stripe or any other pattern. It uses standard alpha translucency to blend this texture. |
$STRIPE_SCALE | "[ 0.002 0.002 0.2 ]" | Specifies the x y z world scaling to compute the seamless texture coordinate of the stripe texture. |
$STRIPE_COLOR | "[ 1.0 1.0 1.0 ]" | The color modulated against the strip texture’s RGB. If you make your strip texture as gray scale, then you can have greater color control by using this field, as well as only needing one texture to create many colors. |
$STRIPE_LM_SCALE | 0.0 | Interpolates between the lighting intensity of the pixel to full bright based upon this value. |