Files
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.
| Parameter | Type | Default | Description |
|---|
blend | dynamic | — | The blend input consumed by `AddLightBlend`. |
red | dynamic | — | The red input consumed by `AddLightBlend`. |
green | dynamic | — | The green input consumed by `AddLightBlend`. |
blue | dynamic | — | The blue input consumed by `AddLightBlend`. |
alpha2 | dynamic | — | 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).
| Parameter | Type | Default | Description |
|---|
plane | dynamic | — | The plane input consumed by `fastPlaneDistance`. |
x | dynamic | — | The x input consumed by `fastPlaneDistance`. |
y | dynamic | — | The y input consumed by `fastPlaneDistance`. |
z | dynamic | — | The z input consumed by `fastPlaneDistance`. |
View source
# planeDistance
function planeDistance(plane, point)
Implements the `planeDistance` operation for `miniquake.render.gl_rlight` (plane distance).
| Parameter | Type | Default | Description |
|---|
plane | dynamic | — | The plane input consumed by `planeDistance`. |
point | dynamic | — | The point input consumed by `planeDistance`. |
View source
# R_AnimateLight
function R_AnimateLight(lightStyles, currentTime)
Apply the Quake-compatible r animate light behavior.
| Parameter | Type | Default | Description |
|---|
lightStyles | dynamic | — | The light styles input consumed by `R_AnimateLight`. |
currentTime | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
lightStyles | dynamic | — | The light styles input consumed by `R_AnimateLightInto`. |
currentTime | dynamic | — | Time value used by the operation. |
values | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `R_LightPoint`. |
surfaces | dynamic | — | The surfaces input consumed by `R_LightPoint`. |
lightStyleValues | dynamic | — | The light style values input consumed by `R_LightPoint`. |
rootNode | dynamic | — | The root node input consumed by `R_LightPoint`. |
point | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `R_LightPointValue`. |
surfaces | dynamic | — | The surfaces input consumed by `R_LightPointValue`. |
lightStyleValues | dynamic | — | The light style values input consumed by `R_LightPointValue`. |
rootNode | dynamic | — | The root node input consumed by `R_LightPointValue`. |
point | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `R_MarkLights`. |
surfaceBits | dynamic | — | The surface bits input consumed by `R_MarkLights`. |
surfaceFrames | dynamic | — | The surface frames input consumed by `R_MarkLights`. |
frameCount | dynamic | — | Number of entries or units to process. |
light | dynamic | — | The light input consumed by `R_MarkLights`. |
bit | dynamic | — | The bit input consumed by `R_MarkLights`. |
nodeNumber | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `R_PushDlights`. |
surfaceBits | dynamic | — | The surface bits input consumed by `R_PushDlights`. |
surfaceFrames | dynamic | — | The surface frames input consumed by `R_PushDlights`. |
frameCount | dynamic | — | Number of entries or units to process. |
dynamicLights | dynamic | — | The dynamic lights input consumed by `R_PushDlights`. |
currentTime | dynamic | — | Time value used by the operation. |
rootNode | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
light | dynamic | — | The light input consumed by `R_RenderDlight`. |
currentTime | dynamic | — | Time value used by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `R_RenderDlight`. |
viewForward | dynamic | — | The view forward input consumed by `R_RenderDlight`. |
viewRight | dynamic | — | The view right input consumed by `R_RenderDlight`. |
viewUp | dynamic | — | The view up input consumed by `R_RenderDlight`. |
blend | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
dynamicLights | dynamic | — | The dynamic lights input consumed by `R_RenderDlights`. |
currentTime | dynamic | — | Time value used by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `R_RenderDlights`. |
viewForward | dynamic | — | The view forward input consumed by `R_RenderDlights`. |
viewRight | dynamic | — | The view right input consumed by `R_RenderDlights`. |
viewUp | dynamic | — | The view up input consumed by `R_RenderDlights`. |
blend | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
light | dynamic | — | The light input consumed by `R_RenderDlightTrace`. |
currentTime | dynamic | — | Time value used by the operation. |
viewOrigin | dynamic | — | The view origin input consumed by `R_RenderDlightTrace`. |
viewForward | dynamic | — | The view forward input consumed by `R_RenderDlightTrace`. |
viewRight | dynamic | — | The view right input consumed by `R_RenderDlightTrace`. |
viewUp | dynamic | — | The view up input consumed by `R_RenderDlightTrace`. |
blend | dynamic | — | 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).
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `RecursiveLightPoint`. |
surfaces | dynamic | — | The surfaces input consumed by `RecursiveLightPoint`. |
lightStyleValues | dynamic | — | The light style values input consumed by `RecursiveLightPoint`. |
nodeNumber | dynamic | — | The node number input consumed by `RecursiveLightPoint`. |
start | dynamic | — | The start input consumed by `RecursiveLightPoint`. |
finish | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `RecursiveLightPointValue`. |
surfaces | dynamic | — | The surfaces input consumed by `RecursiveLightPointValue`. |
lightStyleValues | dynamic | — | The light style values input consumed by `RecursiveLightPointValue`. |
nodeNumber | dynamic | — | The node number input consumed by `RecursiveLightPointValue`. |
x | dynamic | — | The x input consumed by `RecursiveLightPointValue`. |
y | dynamic | — | The y input consumed by `RecursiveLightPointValue`. |
startZ | dynamic | — | The start z input consumed by `RecursiveLightPointValue`. |
finishZ | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `RecursiveShadowRay`. |
surfaces | dynamic | — | The surfaces input consumed by `RecursiveShadowRay`. |
nodeNumber | dynamic | — | The node number input consumed by `RecursiveShadowRay`. |
startX | dynamic | — | The start x input consumed by `RecursiveShadowRay`. |
startY | dynamic | — | The start y input consumed by `RecursiveShadowRay`. |
startZ | dynamic | — | The start z input consumed by `RecursiveShadowRay`. |
finishX | dynamic | — | The finish x input consumed by `RecursiveShadowRay`. |
finishY | dynamic | — | The finish y input consumed by `RecursiveShadowRay`. |
finishZ | dynamic | — | The finish z input consumed by `RecursiveShadowRay`. |
startFraction | dynamic | — | The start fraction input consumed by `RecursiveShadowRay`. |
finishFraction | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | The surface input consumed by `shadowPointInsideSurface`. |
plane | dynamic | — | The plane input consumed by `shadowPointInsideSurface`. |
x | dynamic | — | The x input consumed by `shadowPointInsideSurface`. |
y | dynamic | — | The y input consumed by `shadowPointInsideSurface`. |
z | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | The map input consumed by `ShadowRay`. |
surfaces | dynamic | — | The surfaces input consumed by `ShadowRay`. |
rootNode | dynamic | — | The root node input consumed by `ShadowRay`. |
startX | dynamic | — | The start x input consumed by `ShadowRay`. |
startY | dynamic | — | The start y input consumed by `ShadowRay`. |
startZ | dynamic | — | The start z input consumed by `ShadowRay`. |
finishX | dynamic | — | The finish x input consumed by `ShadowRay`. |
finishY | dynamic | — | The finish y input consumed by `ShadowRay`. |
finishZ | dynamic | — | 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