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

...

Related HaloScript

Function/global

Type

(rasterizer_lens_flares [boolean])

Toggles rendering of all lens flares.

Global
(rasterizer_lens_flares_occlusion [boolean])

Toggles lens flare occlusion. If set to false, lens flares will no longer be occluded and stay visible even through objects in the foreground.

Global
(rasterizer_lens_flares_occlusion_debug [boolean])

Displays red squares over lens flares in the environment. How much the square is occluded by other geometry or the view frustrum is how much the lens flare fades out. The size of the square relates to the occlusion radius.

Global

Structure and fields

FieldTypeComments
falloff anglefloat
cutoff anglefloat
cos falloff anglefloat
  • Cache only
cos cutoff anglefloat
  • Cache only
occlusion radiusfloat
  • Unit: world units

Primarily controls the size of the camera-facing occlusion square. The more this square is covered, the more the lens flare fades out. A larger radius covers more screen space and gradually fades in/out while passing behind objects in the foreground, while a small radius will cause the lens flare to quickly appear or disappear. The square can be visualized with rasterizer_lens_flares_occlusion_debug 1.

This also controls how far the test square is moved depending on the occlusion offset direction.

occlusion offset directionenum
OptionValueComments
toward viewer0x0

The occlusion test square is moved towards the viewer by the occlusion radius. This avoids the test square being always half-embedded if the lens flare is placed directly on a surface.

However, this offsets the test square perpendicularly toward the camera's view plane, not toward the camera location itself. This results in test squares near the edges of the screen not aligning with their lens flares, causing them to fade out even while on-screen. Avoid setting this value too high to make this less apparent.

marker forward0x1

The test square is moved in the "forward" direction of the marker by the occlusion radius, usually off the surface in the case of BSP lens flares.

none0x2

The test square is not offset.

near fade distancefloat
  • Unit: world units
far fade distancefloat
  • Unit: world units
bitmapTagDependency: bitmap
flagsbitfield
FlagMaskComments
sun0x1
rotation functionenum
OptionValueComments
none0x0
rotation a0x1
rotation b0x2
rotation translation0x3
translation0x4
rotation function scalefloat
  • Default: 360

Yes, the default is indeed 360 radians.

horizontal scalefloat
  • Default: 1
vertical scalefloat
  • Default: 1
reflectionsBlock
  • HEK max count: 32
FieldTypeComments
flagsbitfield
FlagMaskComments
align rotation with screen center0x1
radius not scaled by distance0x2
radius scaled by occlusion factor0x4
occluded by solid objects0x8
bitmap indexuint16
positionfloat
  • Unit: along flare axis
rotation offsetfloat
radiusBounds
  • Unit: world units
FieldTypeComments
minfloat
maxfloat
radius scaled byenum
OptionValueComments
none0x0
rotation0x1
rotation and strafing0x2
distance from center0x3
brightnessBounds
  • Min: 0
  • Max: 1
FieldTypeComments
minfloat
maxfloat
brightness scaled byenum?
tint colorColorARGB
FieldTypeComments
alphafloat
redfloat
greenfloat
bluefloat
color lower boundColorARGB?
color upper boundColorARGB?
more flagsbitfield
FlagMaskComments
interpolate colors in hsv0x1
more colors0x2
animation functionenum
OptionValueComments
one0x0
zero0x1
cosine0x2
cosine variable period0x3
diagonal wave0x4
diagonal wave variable period0x5
slide0x6
slide variable period0x7
noise0x8
jitter0x9
wander0xA
spark0xB
animation periodfloat
  • Unit: world units
  • Default: 1
animation phasefloat
  • Unit: world units

Acknowledgements

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

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