MiniQuake2

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.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.
blockLightsdynamic—blockLights value consumed by this operation.

View source

addDynamicLightsPrefix

function addDynamicLightsPrefix(surface, dLights, dLightCount, blockLights)

Add a counted dynamic-light prefix.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.
dLightCountdynamic—Number of d light to process.
blockLightsdynamic—blockLights value consumed by this operation.

View source

buildLightmap

function buildLightmap(surface, lightStyles, dLights, modulate)

Build lightmap.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.
modulatedynamic—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.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.
dLightCountdynamic—Number of d light to process.
modulatedynamic—modulate value consumed by this operation.

View source

isLitSurface

function isLitSurface(surface)

Report whether is lit surface.

ParameterTypeDefaultDescription
surfacedynamic—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.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.

View source

markDynamicLights

function markDynamicLights(surface, dLights)

Mark dynamic lights.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
dLightsdynamic—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.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.
dLightCountdynamic—Number of d light to process.

View source

prepare

function prepare(surface, lightStyles, dLights, modulate)

Prepare state.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.
dLightsdynamic—dLights value consumed by this operation.
modulatedynamic—modulate value consumed by this operation.

View source

setCacheState

function setCacheState(surface, lightStyles)

Set cache state.

ParameterTypeDefaultDescription
surfacedynamic—surface value consumed by this operation.
lightStylesdynamic—lightStyles value consumed by this operation.

View source

storeRgba

function storeRgba(blockLights, sampleCount)

Return the store rgba value.

ParameterTypeDefaultDescription
blockLightsdynamic—blockLights value consumed by this operation.
sampleCountdynamic—Number of sample to process.

View source

styleRgb

function styleRgb(lightStyles, styleIndex)

Return the style rgb value.

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

View source

styleWhite

function styleWhite(lightStyles, styleIndex)

Return the style white value.

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

View source