MiniQuake

src/miniquake/render/gl_rlight.ml

Package
miniquake.render.gl_rlight
Reachable
Yes

Imports

Declarations

AddLightBlend

function AddLightBlend(blend, red, green, blue, alpha2)

Add state for add light blend.

ParameterTypeDefaultDescription
blenddynamic—The blend input consumed by `AddLightBlend`.
reddynamic—The red input consumed by `AddLightBlend`.
greendynamic—The green input consumed by `AddLightBlend`.
bluedynamic—The blue input consumed by `AddLightBlend`.
alpha2dynamic—The alpha2 input consumed by `AddLightBlend`.

View source

animatedLightStyleBytes

animatedLightStyleBytes

Tracks the module-level animated light style bytes state owned by `miniquake.render.gl_rlight`.

View source

animatedLightStyleSources

animatedLightStyleSources

Tracks the module-level animated light style sources state owned by `miniquake.render.gl_rlight`.

View source

FastLightHit

function FastLightHit()

Implements the `FastLightHit` operation for `miniquake.render.gl_rlight` (fast light hit).

View source

fastLightHit

fastLightHit

Tracks the module-level fast light hit state owned by `miniquake.render.gl_rlight`.

View source

FastLightPlane

function FastLightPlane()

Implements the `FastLightPlane` operation for `miniquake.render.gl_rlight` (fast light plane).

View source

fastLightPlane

fastLightPlane

Tracks the module-level fast light plane state owned by `miniquake.render.gl_rlight`.

View source

FastLightSpotZ

function FastLightSpotZ()

Implements the `FastLightSpotZ` operation for `miniquake.render.gl_rlight` (fast light spot z).

View source

fastLightSpotZ

fastLightSpotZ

Allocation-free production variant. Alias lighting traces a vertical ray, so x/y remain constant and only the z interval changes during BSP descent. Keeping the recursive result scalar avoids one Vec3 plus one three-element result array at every visited node for every visible alias entity.

View source

fastPlaneDistance

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

Implements the `fastPlaneDistance` operation for `miniquake.render.gl_rlight` (fast plane distance).

ParameterTypeDefaultDescription
planedynamic—The plane input consumed by `fastPlaneDistance`.
xdynamic—The x input consumed by `fastPlaneDistance`.
ydynamic—The y input consumed by `fastPlaneDistance`.
zdynamic—The z input consumed by `fastPlaneDistance`.

View source

planeDistance

function planeDistance(plane, point)

Implements the `planeDistance` operation for `miniquake.render.gl_rlight` (plane distance).

ParameterTypeDefaultDescription
planedynamic—The plane input consumed by `planeDistance`.
pointdynamic—The point input consumed by `planeDistance`.

View source

R_AnimateLight

function R_AnimateLight(lightStyles, currentTime)

Apply the Quake-compatible r animate light behavior.

ParameterTypeDefaultDescription
lightStylesdynamic—The light styles input consumed by `R_AnimateLight`.
currentTimedynamic—Time value used by the operation.

View source

R_AnimateLightInto

function R_AnimateLightInto(lightStyles, currentTime, values)

Apply the Quake-compatible r animate light into behavior.

ParameterTypeDefaultDescription
lightStylesdynamic—The light styles input consumed by `R_AnimateLightInto`.
currentTimedynamic—Time value used by the operation.
valuesdynamic—The values input consumed by `R_AnimateLightInto`.

View source

R_LightPoint

function R_LightPoint(map, surfaces, lightStyleValues, rootNode, point)

Apply the Quake-compatible r light point behavior.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `R_LightPoint`.
surfacesdynamic—The surfaces input consumed by `R_LightPoint`.
lightStyleValuesdynamic—The light style values input consumed by `R_LightPoint`.
rootNodedynamic—The root node input consumed by `R_LightPoint`.
pointdynamic—The point input consumed by `R_LightPoint`.

View source

R_LightPointValue

function R_LightPointValue(map, surfaces, lightStyleValues, rootNode, point)

Apply the Quake-compatible r light point value behavior.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `R_LightPointValue`.
surfacesdynamic—The surfaces input consumed by `R_LightPointValue`.
lightStyleValuesdynamic—The light style values input consumed by `R_LightPointValue`.
rootNodedynamic—The root node input consumed by `R_LightPointValue`.
pointdynamic—The point input consumed by `R_LightPointValue`.

View source

R_MarkLights

function R_MarkLights(map, surfaceBits, surfaceFrames, frameCount, light, bit, nodeNumber)

Apply the Quake-compatible r mark lights behavior.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `R_MarkLights`.
surfaceBitsdynamic—The surface bits input consumed by `R_MarkLights`.
surfaceFramesdynamic—The surface frames input consumed by `R_MarkLights`.
frameCountdynamic—Number of entries or units to process.
lightdynamic—The light input consumed by `R_MarkLights`.
bitdynamic—The bit input consumed by `R_MarkLights`.
nodeNumberdynamic—The node number input consumed by `R_MarkLights`.

View source

R_PushDlights

function R_PushDlights(map, surfaceBits, surfaceFrames, frameCount, dynamicLights, currentTime, rootNode)

Apply the Quake-compatible r push dlights behavior.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `R_PushDlights`.
surfaceBitsdynamic—The surface bits input consumed by `R_PushDlights`.
surfaceFramesdynamic—The surface frames input consumed by `R_PushDlights`.
frameCountdynamic—Number of entries or units to process.
dynamicLightsdynamic—The dynamic lights input consumed by `R_PushDlights`.
currentTimedynamic—Time value used by the operation.
rootNodedynamic—The root node input consumed by `R_PushDlights`.

View source

R_RenderDlight

function R_RenderDlight(light, currentTime, viewOrigin, viewForward, viewRight, viewUp, blend)

Apply the Quake-compatible r render dlight behavior.

ParameterTypeDefaultDescription
lightdynamic—The light input consumed by `R_RenderDlight`.
currentTimedynamic—Time value used by the operation.
viewOrigindynamic—The view origin input consumed by `R_RenderDlight`.
viewForwarddynamic—The view forward input consumed by `R_RenderDlight`.
viewRightdynamic—The view right input consumed by `R_RenderDlight`.
viewUpdynamic—The view up input consumed by `R_RenderDlight`.
blenddynamic—The blend input consumed by `R_RenderDlight`.

View source

R_RenderDlights

function R_RenderDlights(dynamicLights, currentTime, viewOrigin, viewForward, viewRight, viewUp, blend)

Apply the Quake-compatible r render dlights behavior.

ParameterTypeDefaultDescription
dynamicLightsdynamic—The dynamic lights input consumed by `R_RenderDlights`.
currentTimedynamic—Time value used by the operation.
viewOrigindynamic—The view origin input consumed by `R_RenderDlights`.
viewForwarddynamic—The view forward input consumed by `R_RenderDlights`.
viewRightdynamic—The view right input consumed by `R_RenderDlights`.
viewUpdynamic—The view up input consumed by `R_RenderDlights`.
blenddynamic—The blend input consumed by `R_RenderDlights`.

View source

R_RenderDlightTrace

function R_RenderDlightTrace(light, currentTime, viewOrigin, viewForward, viewRight, viewUp, blend)

Apply the Quake-compatible r render dlight trace behavior.

ParameterTypeDefaultDescription
lightdynamic—The light input consumed by `R_RenderDlightTrace`.
currentTimedynamic—Time value used by the operation.
viewOrigindynamic—The view origin input consumed by `R_RenderDlightTrace`.
viewForwarddynamic—The view forward input consumed by `R_RenderDlightTrace`.
viewRightdynamic—The view right input consumed by `R_RenderDlightTrace`.
viewUpdynamic—The view up input consumed by `R_RenderDlightTrace`.
blenddynamic—The blend input consumed by `R_RenderDlightTrace`.

View source

RecursiveLightPoint

function RecursiveLightPoint(map, surfaces, lightStyleValues, nodeNumber, start, finish)

Implements the `RecursiveLightPoint` operation for `miniquake.render.gl_rlight` (recursive light point).

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `RecursiveLightPoint`.
surfacesdynamic—The surfaces input consumed by `RecursiveLightPoint`.
lightStyleValuesdynamic—The light style values input consumed by `RecursiveLightPoint`.
nodeNumberdynamic—The node number input consumed by `RecursiveLightPoint`.
startdynamic—The start input consumed by `RecursiveLightPoint`.
finishdynamic—The finish input consumed by `RecursiveLightPoint`.

View source

RecursiveLightPointValue

function RecursiveLightPointValue(map, surfaces, lightStyleValues, nodeNumber, x, y, startZ, finishZ)

Return recursive light point value derived from the active module state.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `RecursiveLightPointValue`.
surfacesdynamic—The surfaces input consumed by `RecursiveLightPointValue`.
lightStyleValuesdynamic—The light style values input consumed by `RecursiveLightPointValue`.
nodeNumberdynamic—The node number input consumed by `RecursiveLightPointValue`.
xdynamic—The x input consumed by `RecursiveLightPointValue`.
ydynamic—The y input consumed by `RecursiveLightPointValue`.
startZdynamic—The start z input consumed by `RecursiveLightPointValue`.
finishZdynamic—The finish z input consumed by `RecursiveLightPointValue`.

View source

RecursiveShadowRay

function RecursiveShadowRay(map, surfaces, nodeNumber, startX, startY, startZ, finishX, finishY, finishZ, startFraction, finishFraction)

Walk the render BSP from the ray origin toward its endpoint and retain the first actual world polygon. Scalar coordinates keep thousands of shadow rays per frame free of temporary Vec3 and result-array allocations.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `RecursiveShadowRay`.
surfacesdynamic—The surfaces input consumed by `RecursiveShadowRay`.
nodeNumberdynamic—The node number input consumed by `RecursiveShadowRay`.
startXdynamic—The start x input consumed by `RecursiveShadowRay`.
startYdynamic—The start y input consumed by `RecursiveShadowRay`.
startZdynamic—The start z input consumed by `RecursiveShadowRay`.
finishXdynamic—The finish x input consumed by `RecursiveShadowRay`.
finishYdynamic—The finish y input consumed by `RecursiveShadowRay`.
finishZdynamic—The finish z input consumed by `RecursiveShadowRay`.
startFractiondynamic—The start fraction input consumed by `RecursiveShadowRay`.
finishFractiondynamic—The finish fraction input consumed by `RecursiveShadowRay`.

View source

shadowPointInsideSurface

function shadowPointInsideSurface(surface, plane, x, y, z)

Test a BSP-plane intersection against the real convex render polygon rather than only its lightmap rectangle. The latter can extend beyond sloped or clipped faces and would let a projected shadow jump through a nearby wall.

ParameterTypeDefaultDescription
surfacedynamic—The surface input consumed by `shadowPointInsideSurface`.
planedynamic—The plane input consumed by `shadowPointInsideSurface`.
xdynamic—The x input consumed by `shadowPointInsideSurface`.
ydynamic—The y input consumed by `shadowPointInsideSurface`.
zdynamic—The z input consumed by `shadowPointInsideSurface`.

View source

ShadowRay

function ShadowRay(map, surfaces, rootNode, startX, startY, startZ, finishX, finishY, finishZ)

Trace one arbitrary segment against the rendered BSP surfaces.

ParameterTypeDefaultDescription
mapdynamic—The map input consumed by `ShadowRay`.
surfacesdynamic—The surfaces input consumed by `ShadowRay`.
rootNodedynamic—The root node input consumed by `ShadowRay`.
startXdynamic—The start x input consumed by `ShadowRay`.
startYdynamic—The start y input consumed by `ShadowRay`.
startZdynamic—The start z input consumed by `ShadowRay`.
finishXdynamic—The finish x input consumed by `ShadowRay`.
finishYdynamic—The finish y input consumed by `ShadowRay`.
finishZdynamic—The finish z input consumed by `ShadowRay`.

View source

shadowRayFinishX

shadowRayFinishX

Tracks the module-level shadow ray finish x state owned by `miniquake.render.gl_rlight`.

View source

shadowRayFinishY

shadowRayFinishY

Tracks the module-level shadow ray finish y state owned by `miniquake.render.gl_rlight`.

View source

shadowRayFinishZ

shadowRayFinishZ

Tracks the module-level shadow ray finish z state owned by `miniquake.render.gl_rlight`.

View source

ShadowRayFraction

function ShadowRayFraction()

Return the normalized fraction of the latest world-surface hit.

View source

shadowRayFraction

shadowRayFraction

Tracks the module-level shadow ray fraction state owned by `miniquake.render.gl_rlight`.

View source

ShadowRayHit

function ShadowRayHit()

Report whether the latest arbitrary shadow segment reached a world polygon.

View source

shadowRayHit

shadowRayHit

Allocation-free state for arbitrary world-surface shadow rays. Unlike the vertical light sampler, this path records a complete 3-D receiver and the normalized fraction along the submitted segment.

View source

ShadowRayNormalX

function ShadowRayNormalX()

Return the oriented latest receiver normal x coordinate.

View source

shadowRayNormalX

shadowRayNormalX

Tracks the module-level shadow ray normal x state owned by `miniquake.render.gl_rlight`.

View source

ShadowRayNormalY

function ShadowRayNormalY()

Return the oriented latest receiver normal y coordinate.

View source

shadowRayNormalY

shadowRayNormalY

Tracks the module-level shadow ray normal y state owned by `miniquake.render.gl_rlight`.

View source

ShadowRayNormalZ

function ShadowRayNormalZ()

Return the oriented latest receiver normal z coordinate.

View source

shadowRayNormalZ

shadowRayNormalZ

Tracks the module-level shadow ray normal z state owned by `miniquake.render.gl_rlight`.

View source

shadowRayStartX

shadowRayStartX

Tracks the module-level shadow ray start x state owned by `miniquake.render.gl_rlight`.

View source

shadowRayStartY

shadowRayStartY

Tracks the module-level shadow ray start y state owned by `miniquake.render.gl_rlight`.

View source

shadowRayStartZ

shadowRayStartZ

Tracks the module-level shadow ray start z state owned by `miniquake.render.gl_rlight`.

View source

ShadowRayX

function ShadowRayX()

Return the latest shadow receiver x coordinate.

View source

shadowRayX

shadowRayX

Tracks the module-level shadow ray x state owned by `miniquake.render.gl_rlight`.

View source

ShadowRayY

function ShadowRayY()

Return the latest shadow receiver y coordinate.

View source

shadowRayY

shadowRayY

Tracks the module-level shadow ray y state owned by `miniquake.render.gl_rlight`.

View source

ShadowRayZ

function ShadowRayZ()

Return the latest shadow receiver z coordinate.

View source

shadowRayZ

shadowRayZ

Tracks the module-level shadow ray z state owned by `miniquake.render.gl_rlight`.

View source