shader_transparent_chicago
The transparent chicago shader is applied to surfaces that require transparent elements. This shader can contain up to 4 "stages" of bitmaps, where each stage and its alpha can animate and blend to form final accumulated diffuse and alpha channels. The shader can be given a final framebuffer blending function too, like add for holograms.
Alpha-tested BSP surfaces like 2D billboard trees and ladders can use the simpler shader_environment instead.
If referenced as an extra shader layer, this tag will inherit some fields from its parent regardless of its own flags (e.g. first map type).
Structure and fields
This tag inherits fields from shader which are not shown here. See the parent's page for more information. The following information is unique to the shader_transparent_chicago tag.
Field |
Type |
Comments |
numeric counter limit |
u8 |
|
shader transparent chicago flags |
bitfield(8) |
|
Flag | Mask | Comments | alpha tested | 0x1 | | decal | 0x2 | | two sided | 0x4 | | first map is in screenspace | 0x8 | | draw before water | 0x10 | | ignore effect | 0x20 | | scale first map with distance | 0x40 | | numeric | 0x80 | | |
first map type |
enum |
|
Option | Value | Comments | 2d map | 0x0 | | first map is reflection cube map | 0x1 | | first map is object centered cube map | 0x2 | | first map is viewer centered cube map | 0x3 | | |
framebuffer blend function |
enum |
|
Option | Value | Comments | alpha blend | 0x0 | | multiply | 0x1 | | double multiply | 0x2 | | add | 0x3 | | subtract | 0x4 | | component min | 0x5 | | component max | 0x6 | | alpha multiply add | 0x7 | | |
framebuffer fade mode |
enum |
|
Option | Value | Comments | none | 0x0 | | fade when perpendicular | 0x1 | | fade when parallel | 0x2 | | |
framebuffer fade source |
enum |
|
Option | Value | Comments | none | 0x0 | | a out | 0x1 | | b out | 0x2 | | c out | 0x3 | | d out | 0x4 | | |
|
pad(2) |
|
lens flare spacing |
f32 |
|
lens flare |
Reference? : lens_flare
|
|
|
Block? |
Specifies additional shaders to render before this parent shader. The same geometry is essentially rendered multiple times with different shaders. Each extra layer shader can have an independent framebuffer blend function, but some settings like first map is reflection cube map from the parent will also override the setting in extra layers. Although any shader type can be referenced here, only the chicago transparent shaders are properly supported; the other types will either not render or render incorrectly. Warning: Using a shader with extra layers on an object with transparent self occlusion enabled causes Sapien to crash. |
Field | Type | Comments | | Reference? : shader
| | |
maps |
Block? |
|
Field | Type | Comments | flags | bitfield(16) | | Flag | Mask | Comments | unfiltered | 0x1 | | alpha replicate | 0x2 | | u clamped | 0x4 | | v clamped | 0x8 | | | | pad(2) | | | pad(40) | | color function | enum | | Option | Value | Comments | current | 0x0 | | next map | 0x1 | | multiply | 0x2 | | double multiply | 0x3 | | add | 0x4 | | add signed current | 0x5 | | add signed next map | 0x6 | | subtract current | 0x7 | | subtract next map | 0x8 | | blend current alpha | 0x9 | | blend current alpha inverse | 0xa | | blend next map alpha | 0xb | | blend next map alpha inverse | 0xc | | | alpha function | enum | | Option | Value | Comments | current | 0x0 | | next map | 0x1 | | multiply | 0x2 | | double multiply | 0x3 | | add | 0x4 | | add signed current | 0x5 | | add signed next map | 0x6 | | subtract current | 0x7 | | subtract next map | 0x8 | | blend current alpha | 0x9 | | blend current alpha inverse | 0xa | | blend next map alpha | 0xb | | blend next map alpha inverse | 0xc | | | | pad(36) | | map u scale | f32 | | map v scale | f32 | | map u offset | f32 | | map v offset | f32 | | map rotation | f32 | | mipmap bias | Fraction: f32 | | map | Reference? : bitmap
| | | pad(40) | | u animation source | enum | | Option | Value | Comments | none | 0x0 | | a out | 0x1 | | b out | 0x2 | | c out | 0x3 | | d out | 0x4 | | | u animation function | enum | | Option | Value | Comments | one | 0x0 | | zero | 0x1 | | cosine | 0x2 | | cosine variable period | 0x3 | | diagonal wave | 0x4 | | diagonal wave variable period | 0x5 | | slide | 0x6 | | slide variable period | 0x7 | | noise | 0x8 | | jitter | 0x9 | | wander | 0xa | | spark | 0xb | | | u animation period | f32 (seconds) | | u animation phase | f32 | | u animation scale | f32 (world units) | | v animation source | enum | | Option | Value | Comments | none | 0x0 | | a out | 0x1 | | b out | 0x2 | | c out | 0x3 | | d out | 0x4 | | | v animation function | enum | | Option | Value | Comments | one | 0x0 | | zero | 0x1 | | cosine | 0x2 | | cosine variable period | 0x3 | | diagonal wave | 0x4 | | diagonal wave variable period | 0x5 | | slide | 0x6 | | slide variable period | 0x7 | | noise | 0x8 | | jitter | 0x9 | | wander | 0xa | | spark | 0xb | | | v animation period | f32 (seconds) | | v animation phase | f32 | | v animation scale | f32 (world units) | | rotation animation source | enum | | Option | Value | Comments | none | 0x0 | | a out | 0x1 | | b out | 0x2 | | c out | 0x3 | | d out | 0x4 | | | rotation animation function | enum | | Option | Value | Comments | one | 0x0 | | zero | 0x1 | | cosine | 0x2 | | cosine variable period | 0x3 | | diagonal wave | 0x4 | | diagonal wave variable period | 0x5 | | slide | 0x6 | | slide variable period | 0x7 | | noise | 0x8 | | jitter | 0x9 | | wander | 0xa | | spark | 0xb | | | rotation animation period | f32 (seconds) | | rotation animation phase | f32 | | rotation animation scale | f32 (degrees) | | rotation animation center | Point2D (2) | | |
|
bitfield(32) |
|
Flag | Mask | Comments | | 0x1 | | | 0x2 | | |
|
pad(8) |
|
This information was partially generated using Invader tag definitions.
Acknowledgements
Thanks to the following individuals for their research or contributions to this topic:
- Kavawuvi (Invader tag definitions)
- MosesOfEgypt (Tag structure research)