MiniQuake2

src/miniquake2/renderer/classic/point_lighting.ml

Provides miniquake2 renderer classic point lighting facilities for this project.

Package
miniquake2.renderer.classic.point_lighting
Reachable
Yes

Imports

Declarations

dynamicPointLightSample

function dynamicPointLightSample(world, frame, origin, staticSample)

Add the current frame's dynamic lights to a copied static sample. Keeping the immutable BSP result separate lets alias renderers cache the expensive point trace while muzzle flashes and projectiles still affect every frame.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
framedynamic—frame value consumed by this operation.
origindynamic—origin value consumed by this operation.
staticSampledynamic—staticSample value consumed by this operation.

View source

emptyPointSample

inline function emptyPointSample(red, green, blue)

Construct the no-hit or fullbright sample without temporary vector records.

ParameterTypeDefaultDescription
reddynamic—red value consumed by this operation.
greendynamic—green value consumed by this operation.
bluedynamic—blue value consumed by this operation.

View source

pointLight

function pointLight(world, frame, origin)

Return the point light value.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
framedynamic—frame value consumed by this operation.
origindynamic—origin value consumed by this operation.

View source

pointLightSample

function pointLightSample(world, frame, origin)

Sample point light.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
framedynamic—frame value consumed by this operation.
origindynamic—origin value consumed by this operation.

View source

pointPlaneDistance

inline function pointPlaneDistance(x, y, z, plane)

Return the point plane distance value.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
zdynamic—z value consumed by this operation.
planedynamic—plane value consumed by this operation.

View source

pointProjected

inline function pointProjected(x, y, z, vector)

Return the point projected value.

ParameterTypeDefaultDescription
xdynamic—Horizontal coordinate used by the operation.
ydynamic—Vertical coordinate used by the operation.
zdynamic—z value consumed by this operation.
vectordynamic—vector value consumed by this operation.

View source

pointStyleRgb

inline function pointStyleRgb(lightStyles, styleIndex)

Return the point style rgb value.

ParameterTypeDefaultDescription
lightStylesdynamic—lightStyles value consumed by this operation.
styleIndexdynamic—Zero-based index of style.

View source

staticPointLight

function staticPointLight(world, lightStyles, origin)

Return the static point light value.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
origindynamic—origin value consumed by this operation.

View source

staticPointLightSample

function staticPointLightSample(world, lightStyles, origin)

Iterative equivalent of ref_gl RecursiveLightPoint. Each crossing saves one post-node surface check and far segment. ClassicWorld owns the fixed stacks, so every alias-light query remains allocation-free until its result is returned.

ParameterTypeDefaultDescription
worlddynamic—world value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
origindynamic—origin value consumed by this operation.

View source