This page is incomplete! You can contribute information using GitHub issues or pull requests.

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).

Related HaloScript

Function/global

Type

(rasterizer_active_camouflage_multipass [boolean])

Toggles whether or not transparent shaders are shown through active camouflage. If disabled, shaders like glass or lights will not be visible through a camouflaged unit.

Global
(rasterizer_model_transparents [boolean])

Toggles the rendering of transparent shaders in models. For example, the Warthog's windshield.

Global
(<void> reload_shader_transparent_chicago)

Reloads all shader_transparent_chicago tags. Use this in Sapien or Standalone to see changes to their bitmaps or parameters without having to reload the scenario.

Function

Structure and fields

FieldTypeComments
numeric counter limituint8
shader transparent chicago flagsbitfield
FlagMaskComments
alpha tested0x1
decal0x2
two sided0x4
first map is in screenspace0x8
draw before water0x10
ignore effect0x20
scale first map with distance0x40
numeric0x80
first map typeenum
OptionValueComments
2d map0x0
first map is reflection cube map0x1
first map is object centered cube map0x2
first map is viewer centered cube map0x3
framebuffer blend functionenum
OptionValueComments
alpha blend0x0
multiply0x1
double multiply0x2
add0x3
subtract0x4
component min0x5
component max0x6
alpha multiply add0x7
framebuffer fade modeenum
OptionValueComments
none0x0
fade when perpendicular0x1
fade when parallel0x2
framebuffer fade sourceenum
OptionValueComments
none0x0
a out0x1
b out0x2
c out0x3
d out0x4
lens flare spacingfloat
lens flareTagDependency: lens_flare
extra layersBlock
  • 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.

FieldTypeComments
shaderTagDependency: shader
mapsBlock
  • HEK max count: 4
  • Max: 4

Warning: Legacy Sapien will crash if this block is empty. The shader is not rendered in H1A Sapien or in-game in this case.

FieldTypeComments
flagsbitfield
FlagMaskComments
unfiltered0x1
alpha replicate0x2
u clamped0x4
v clamped0x8
color functionenum
OptionValueComments
current0x0
next map0x1
multiply0x2
double multiply0x3
add0x4
add signed current0x5
add signed next map0x6
subtract current0x7
subtract next map0x8
blend current alpha0x9
blend current alpha inverse0xA
blend next map alpha0xB
blend next map alpha inverse0xC
alpha functionenum?
map u scalefloat
map v scalefloat
map u offsetfloat
map v offsetfloat
map rotationfloat
mipmap biasfloat
  • Min: 0
  • Max: 1
mapTagDependency: bitmap
u animation sourceenum?
u animation functionenum
OptionValueComments
one0x0
zero0x1
cosine0x2
cosine variable period0x3
diagonal wave0x4
diagonal wave variable period0x5
slide0x6
slide variable period0x7
noise0x8
jitter0x9
wander0xA
spark0xB
u animation periodfloat
  • Unit: seconds
  • Default: 1
u animation phasefloat
u animation scalefloat
  • Unit: world units
  • Default: 1
v animation sourceenum?
v animation functionenum?
v animation periodfloat
  • Unit: seconds
  • Default: 1
v animation phasefloat
v animation scalefloat
  • Unit: world units
  • Default: 1
rotation animation sourceenum?
rotation animation functionenum?
rotation animation periodfloat
  • Unit: seconds
  • Default: 1
rotation animation phasefloat
rotation animation scalefloat
  • Unit: degrees
  • Default: 360
rotation animation centerPoint2D
FieldTypeComments
xfloat
yfloat
extra flagsbitfield
FlagMaskComments
don't fade active camouflage0x1
numeric countdown timer0x2
custom edition blending0x4

Custom edition originally had an incorrect implementation of the multiply and double multiply framebuffer blend functions for transparent shaders which made fully dark pixels transparent. MCC is fixed but this flag allows modders to use custom edition's blending, which can help when porting legacy tags to the updated engine.

Acknowledgements

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

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