shader_transparent_generic (Xbox)
The shader_transparent_generic tag is used in the Xbox version of the game for a large number of materials, such as jackal shields, teleporters, control panels, Cortana, and more. Instances of this shader were replaced with shader_transparent_chicago and shader_transparent_chicago_extended when the game was ported to PC, but these shader types cannot fully replicate original appearances.
Only the original Xbox version of the game supports this shader. While Guerilla and Tool allow creating these tags and building them into maps, they are invisible in the PC port and all of its derivatives like MCC.
Replication
Most of these shaders can be accurately recreated using extra layers and/or 4x4 "tint" bitmaps for recoloring the output of the shader.
Some other shaders will need small 256x4 gradient tint bitmaps that are animated to slide back and forth to tint the shaders output a blend of two different colors.
The most complex of the shaders can only be recreated using very large animated bitmaps that have had all their output pre-computed for each frame of the animation, however these can't be timed properly and are inefficient.
The Refined project attempts to recreate classic Xbox visuals by improving transparent shaders using these techniques.
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_generic tag.
Field |
Type |
Comments |
numeric counter limit |
u8 |
|
shader transparent generic 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 (world units) |
|
lens flare |
Reference? |
|
|
Block? |
|
Field | Type | Comments | | Reference? | | |
maps |
Block? |
|
Field | Type | Comments | flags | bitfield(16) | | Flag | Mask | Comments | unfiltered | 0x1 | | u clamped | 0x2 | | v clamped | 0x4 | | | | pad(2) | | map u scale | f32 | | map v scale | f32 | | map u offset | f32 | | map v offset | f32 | | map rotation | f32 (degrees) | | mapmap bias | Fraction: f32 | | map | Reference? | | 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 (repeats) | | 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 (repeats) | | 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) | | |
stages |
Block? |
|
Field | Type | Comments | flags | bitfield(16) | | Flag | Mask | Comments | color mux | 0x1 | | alpha mux | 0x2 | | a out controls color0 animation | 0x4 | | | | pad(2) | | color0 source | enum | | Option | Value | Comments | none | 0x0 | | a | 0x1 | | b | 0x2 | | c | 0x3 | | d | 0x4 | | | color0 animation function | enum | | Option | Value | Comments | none | 0x0 | | a out | 0x1 | | b out | 0x2 | | c out | 0x3 | | d out | 0x4 | | | color0 animation period | f32 (seconds) | | color0 animation lower bound | ColorARGB (4) - alpha:
f32 - red:
f32 - green:
f32 - blue:
f32 | | color0 animation upper bound | ColorARGB (4) - alpha:
f32 - red:
f32 - green:
f32 - blue:
f32 | | color1 | ColorARGB (4) - alpha:
f32 - red:
f32 - green:
f32 - blue:
f32 | | input a | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map color 0 | 0x5 | | map color 1 | 0x6 | | map color 2 | 0x7 | | map color 3 | 0x8 | | vertex color 0 diffuse light | 0x9 | | vertex color 1 fade perpendicular | 0xa | | scratch color 0 | 0xb | | scratch color 1 | 0xc | | constant color 0 | 0xd | | constant color 1 | 0xe | | map alpha 0 | 0xf | | map alpha 1 | 0x10 | | map alpha 2 | 0x11 | | map alpha 3 | 0x12 | | vertex alpha 0 fade none | 0x13 | | vertex alpha 1 fade perpendicular | 0x14 | | scratch alpha 0 | 0x15 | | scratch alpha 1 | 0x16 | | constant alpha 0 | 0x17 | | constant alpha 1 | 0x18 | | | input a mapping | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | input b | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map color 0 | 0x5 | | map color 1 | 0x6 | | map color 2 | 0x7 | | map color 3 | 0x8 | | vertex color 0 diffuse light | 0x9 | | vertex color 1 fade perpendicular | 0xa | | scratch color 0 | 0xb | | scratch color 1 | 0xc | | constant color 0 | 0xd | | constant color 1 | 0xe | | map alpha 0 | 0xf | | map alpha 1 | 0x10 | | map alpha 2 | 0x11 | | map alpha 3 | 0x12 | | vertex alpha 0 fade none | 0x13 | | vertex alpha 1 fade perpendicular | 0x14 | | scratch alpha 0 | 0x15 | | scratch alpha 1 | 0x16 | | constant alpha 0 | 0x17 | | constant alpha 1 | 0x18 | | | input b mapping | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | input c | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map color 0 | 0x5 | | map color 1 | 0x6 | | map color 2 | 0x7 | | map color 3 | 0x8 | | vertex color 0 diffuse light | 0x9 | | vertex color 1 fade perpendicular | 0xa | | scratch color 0 | 0xb | | scratch color 1 | 0xc | | constant color 0 | 0xd | | constant color 1 | 0xe | | map alpha 0 | 0xf | | map alpha 1 | 0x10 | | map alpha 2 | 0x11 | | map alpha 3 | 0x12 | | vertex alpha 0 fade none | 0x13 | | vertex alpha 1 fade perpendicular | 0x14 | | scratch alpha 0 | 0x15 | | scratch alpha 1 | 0x16 | | constant alpha 0 | 0x17 | | constant alpha 1 | 0x18 | | | input c mapping | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | input d | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map color 0 | 0x5 | | map color 1 | 0x6 | | map color 2 | 0x7 | | map color 3 | 0x8 | | vertex color 0 diffuse light | 0x9 | | vertex color 1 fade perpendicular | 0xa | | scratch color 0 | 0xb | | scratch color 1 | 0xc | | constant color 0 | 0xd | | constant color 1 | 0xe | | map alpha 0 | 0xf | | map alpha 1 | 0x10 | | map alpha 2 | 0x11 | | map alpha 3 | 0x12 | | vertex alpha 0 fade none | 0x13 | | vertex alpha 1 fade perpendicular | 0x14 | | scratch alpha 0 | 0x15 | | scratch alpha 1 | 0x16 | | constant alpha 0 | 0x17 | | constant alpha 1 | 0x18 | | | input d mapping | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | output ab | enum | | Option | Value | Comments | alpha discard | 0x0 | | alpha scratch alpha 0 final alpha | 0x1 | | alpha scratch alpha 1 | 0x2 | | alpha vertex alpha 0 fog | 0x3 | | alpha vertex alpha 1 | 0x4 | | alpha map alpha 0 | 0x5 | | alpha map alpha 1 | 0x6 | | alpha map alpha 2 | 0x7 | | alpha map alpha 3 | 0x8 | | | output ab function | enum | | Option | Value | Comments | multiply | 0x0 | | dot product | 0x1 | | | output bc | enum | | Option | Value | Comments | alpha discard | 0x0 | | alpha scratch alpha 0 final alpha | 0x1 | | alpha scratch alpha 1 | 0x2 | | alpha vertex alpha 0 fog | 0x3 | | alpha vertex alpha 1 | 0x4 | | alpha map alpha 0 | 0x5 | | alpha map alpha 1 | 0x6 | | alpha map alpha 2 | 0x7 | | alpha map alpha 3 | 0x8 | | | output cd function | enum | | Option | Value | Comments | multiply | 0x0 | | dot product | 0x1 | | | output ab cd mux sum | enum | | Option | Value | Comments | alpha discard | 0x0 | | alpha scratch alpha 0 final alpha | 0x1 | | alpha scratch alpha 1 | 0x2 | | alpha vertex alpha 0 fog | 0x3 | | alpha vertex alpha 1 | 0x4 | | alpha map alpha 0 | 0x5 | | alpha map alpha 1 | 0x6 | | alpha map alpha 2 | 0x7 | | alpha map alpha 3 | 0x8 | | | output mapping color | enum | | Option | Value | Comments | color identity | 0x0 | | color scale by 1 2 | 0x1 | | color scale by 2 | 0x2 | | color scale by 4 | 0x3 | | color bias by 1 2 | 0x4 | | color expand normal | 0x5 | | | input a alpha | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map alpha 0 | 0x5 | | map alpha 1 | 0x6 | | map alpha 2 | 0x7 | | map alpha 3 | 0x8 | | vertex alpha 0 fade none | 0x9 | | vertex alpha 1 fade perpendicular | 0xa | | scratch alpha 0 | 0xb | | scratch alpha 1 | 0xc | | constant alpha 0 | 0xd | | constant alpha 1 | 0xe | | map blue 0 | 0xf | | map blue 1 | 0x10 | | map blue 2 | 0x11 | | map blue 3 | 0x12 | | vertex blue 0 blue light | 0x13 | | vertex blue 1 fade parallel | 0x14 | | scratch blue 0 | 0x15 | | scratch blue 1 | 0x16 | | constant blue 0 | 0x17 | | constant blue 1 | 0x18 | | | input a mapping alpha | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | input b alpha | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map alpha 0 | 0x5 | | map alpha 1 | 0x6 | | map alpha 2 | 0x7 | | map alpha 3 | 0x8 | | vertex alpha 0 fade none | 0x9 | | vertex alpha 1 fade perpendicular | 0xa | | scratch alpha 0 | 0xb | | scratch alpha 1 | 0xc | | constant alpha 0 | 0xd | | constant alpha 1 | 0xe | | map blue 0 | 0xf | | map blue 1 | 0x10 | | map blue 2 | 0x11 | | map blue 3 | 0x12 | | vertex blue 0 blue light | 0x13 | | vertex blue 1 fade parallel | 0x14 | | scratch blue 0 | 0x15 | | scratch blue 1 | 0x16 | | constant blue 0 | 0x17 | | constant blue 1 | 0x18 | | | input b mapping alpha | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | input c alpha | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map alpha 0 | 0x5 | | map alpha 1 | 0x6 | | map alpha 2 | 0x7 | | map alpha 3 | 0x8 | | vertex alpha 0 fade none | 0x9 | | vertex alpha 1 fade perpendicular | 0xa | | scratch alpha 0 | 0xb | | scratch alpha 1 | 0xc | | constant alpha 0 | 0xd | | constant alpha 1 | 0xe | | map blue 0 | 0xf | | map blue 1 | 0x10 | | map blue 2 | 0x11 | | map blue 3 | 0x12 | | vertex blue 0 blue light | 0x13 | | vertex blue 1 fade parallel | 0x14 | | scratch blue 0 | 0x15 | | scratch blue 1 | 0x16 | | constant blue 0 | 0x17 | | constant blue 1 | 0x18 | | | input c mapping alpha | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | input d alpha | enum | | Option | Value | Comments | zero | 0x0 | | one | 0x1 | | one half | 0x2 | | negative one | 0x3 | | negative one half | 0x4 | | map alpha 0 | 0x5 | | map alpha 1 | 0x6 | | map alpha 2 | 0x7 | | map alpha 3 | 0x8 | | vertex alpha 0 fade none | 0x9 | | vertex alpha 1 fade perpendicular | 0xa | | scratch alpha 0 | 0xb | | scratch alpha 1 | 0xc | | constant alpha 0 | 0xd | | constant alpha 1 | 0xe | | map blue 0 | 0xf | | map blue 1 | 0x10 | | map blue 2 | 0x11 | | map blue 3 | 0x12 | | vertex blue 0 blue light | 0x13 | | vertex blue 1 fade parallel | 0x14 | | scratch blue 0 | 0x15 | | scratch blue 1 | 0x16 | | constant blue 0 | 0x17 | | constant blue 1 | 0x18 | | | input d mapping alpha | enum | | Option | Value | Comments | clamp x | 0x0 | | 1 clamp x | 0x1 | | 2 | 0x2 | | 1 2 | 0x3 | | clamp x 1 2 | 0x4 | | 1 2 clamp x | 0x5 | | x | 0x6 | | x 1 | 0x7 | | | output ab alpha | enum | | Option | Value | Comments | alpha discard | 0x0 | | alpha scratch alpha 0 final alpha | 0x1 | | alpha scratch alpha 1 | 0x2 | | alpha vertex alpha 0 fog | 0x3 | | alpha vertex alpha 1 | 0x4 | | alpha map alpha 0 | 0x5 | | alpha map alpha 1 | 0x6 | | alpha map alpha 2 | 0x7 | | alpha map alpha 3 | 0x8 | | | output cd alpha | enum | | Option | Value | Comments | alpha discard | 0x0 | | alpha scratch alpha 0 final alpha | 0x1 | | alpha scratch alpha 1 | 0x2 | | alpha vertex alpha 0 fog | 0x3 | | alpha vertex alpha 1 | 0x4 | | alpha map alpha 0 | 0x5 | | alpha map alpha 1 | 0x6 | | alpha map alpha 2 | 0x7 | | alpha map alpha 3 | 0x8 | | | output ab cd mux sum alpha | enum | | Option | Value | Comments | alpha discard | 0x0 | | alpha scratch alpha 0 final alpha | 0x1 | | alpha scratch alpha 1 | 0x2 | | alpha vertex alpha 0 fog | 0x3 | | alpha vertex alpha 1 | 0x4 | | alpha map alpha 0 | 0x5 | | alpha map alpha 1 | 0x6 | | alpha map alpha 2 | 0x7 | | alpha map alpha 3 | 0x8 | | | output mapping alpha | enum | | Option | Value | Comments | color identity | 0x0 | | color scale by 1 2 | 0x1 | | color scale by 2 | 0x2 | | color scale by 4 | 0x3 | | color bias by 1 2 | 0x4 | | color expand normal | 0x5 | | | |
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; Replication techniques)