Files
src/miniquake2/renderer/classic/lightmaps.ml
Provides miniquake2 renderer classic lightmaps facilities for this project.
- Package
miniquake2.renderer.classic.lightmaps- Reachable
- Yes
Imports
Declarations
# addDynamicLights
function addDynamicLights(surface, dLights, blockLights)
Add dynamic lights.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
blockLights | dynamic | — | blockLights value consumed by this operation. |
View source
# addDynamicLightsPrefix
function addDynamicLightsPrefix(surface, dLights, dLightCount, blockLights)
Add a counted dynamic-light prefix.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
dLightCount | dynamic | — | Number of d light to process. |
blockLights | dynamic | — | blockLights value consumed by this operation. |
View source
# buildLightmap
function buildLightmap(surface, lightStyles, dLights, modulate)
Build lightmap.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
modulate | dynamic | — | modulate value consumed by this operation. |
View source
# buildLightmapPrefix
function buildLightmapPrefix(surface, lightStyles, dLights, dLightCount, modulate)
Build a lightmap from a counted dynamic-light prefix.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
dLightCount | dynamic | — | Number of d light to process. |
modulate | dynamic | — | modulate value consumed by this operation. |
View source
# isLitSurface
function isLitSurface(surface)
Report whether is lit surface.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
View source
# lightStylesChanged
inline function lightStylesChanged(surface, lightStyles)
Report whether any style used by a surface changed since its last upload. The cached white value is the same dirty criterion used by ref_gl.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
View source
# markDynamicLights
function markDynamicLights(surface, dLights)
Mark dynamic lights.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
View source
# markDynamicLightsPrefix
function markDynamicLightsPrefix(surface, dLights, dLightCount)
Mark a counted dynamic-light prefix. Product brush movers retain capacity storage and therefore must not scan stale slots past the active count.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
dLightCount | dynamic | — | Number of d light to process. |
View source
# prepare
function prepare(surface, lightStyles, dLights, modulate)
Prepare state.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
dLights | dynamic | — | dLights value consumed by this operation. |
modulate | dynamic | — | modulate value consumed by this operation. |
View source
# setCacheState
function setCacheState(surface, lightStyles)
Set cache state.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
View source
# storeRgba
function storeRgba(blockLights, sampleCount)
Return the store rgba value.
| Parameter | Type | Default | Description |
|---|
blockLights | dynamic | — | blockLights value consumed by this operation. |
sampleCount | dynamic | — | Number of sample to process. |
View source
# styleRgb
function styleRgb(lightStyles, styleIndex)
Return the style rgb value.
| Parameter | Type | Default | Description |
|---|
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
styleIndex | dynamic | — | Zero-based index of style. |
View source
# styleWhite
function styleWhite(lightStyles, styleIndex)
Return the style white value.
| Parameter | Type | Default | Description |
|---|
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
styleIndex | dynamic | — | Zero-based index of style. |
View source