shader_transparent_chicago

🚧 This incomplete article needs help! Please submit tips and info by pull requests or issues or contacting a maintainer.

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 uint8
shader transparent chicago flags bitfield
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
lens flare spacing float
lens flare

TagDependency: lens_flare

extra layers Block
  • HEK max count: 4

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
shader

TagDependency: shader

maps Block
  • HEK max count: 4
  • Max: 4
Field Type Comments
flags bitfield
Flag Mask Comments
unfiltered 0x1
alpha replicate 0x2
u clamped 0x4
v clamped 0x8
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?
map u scale float
map v scale float
map u offset float
map v offset float
map rotation float
mipmap bias float
  • Min: 0
  • Max: 1
map

TagDependency: bitmap

u animation source enum?
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 float
  • Unit: seconds
  • Default: 1
u animation phase float
u animation scale float
  • Unit: world units
  • Default: 1
v animation source enum?
v animation function enum?
v animation period float
  • Unit: seconds
  • Default: 1
v animation phase float
v animation scale float
  • Unit: world units
  • Default: 1
rotation animation source enum?
rotation animation function enum?
rotation animation period float
  • Unit: seconds
  • Default: 1
rotation animation phase float
rotation animation scale float
  • Unit: degrees
  • Default: 360
rotation animation center Point2D
Field Type Comments
x float
y float
extra flags bitfield
Flag Mask Comments
don't fade active camouflage 0x1
numeric countdown timer 0x2

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)