Files
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.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
staticSample | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
red | dynamic | — | red value consumed by this operation. |
green | dynamic | — | green value consumed by this operation. |
blue | dynamic | — | blue value consumed by this operation. |
View source
# pointLight
function pointLight(world, frame, origin)
Return the point light value.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# pointLightSample
function pointLightSample(world, frame, origin)
Sample point light.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
frame | dynamic | — | frame value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source
# pointPlaneDistance
inline function pointPlaneDistance(x, y, z, plane)
Return the point plane distance value.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
z | dynamic | — | z value consumed by this operation. |
plane | dynamic | — | plane value consumed by this operation. |
View source
# pointProjected
inline function pointProjected(x, y, z, vector)
Return the point projected value.
| Parameter | Type | Default | Description |
|---|
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
z | dynamic | — | z value consumed by this operation. |
vector | dynamic | — | vector value consumed by this operation. |
View source
# pointStyleRgb
inline function pointStyleRgb(lightStyles, styleIndex)
Return the point style rgb value.
| Parameter | Type | Default | Description |
|---|
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
styleIndex | dynamic | — | Zero-based index of style. |
View source
# staticPointLight
function staticPointLight(world, lightStyles, origin)
Return the static point light value.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
origin | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
origin | dynamic | — | origin value consumed by this operation. |
View source