MiniQuake

src/miniquake/render/enhanced.ml

Package
miniquake.render.enhanced
Reachable
Yes

Imports

Declarations

activeLightCount

activeLightCount

Tracks the module-level active light count state owned by `miniquake.render.enhanced`.

View source

beginFrame

function beginFrame(dynamicLights, currentTime, viewOrigin)

Select the strongest active lights, pack them into the reusable bridge buffer, and capture the current view matrix in the native backend.

ParameterTypeDefaultDescription
dynamicLightsdynamic—The dynamic lights input consumed by `beginFrame`.
currentTimedynamic—Time value used by the operation.
viewOrigindynamic—The view origin input consumed by `beginFrame`.

View source

beginOverlay

function beginOverlay()

Select the additive per-pixel draw program for following 3-D geometry.

View source

clampShadowQuality

function clampShadowQuality(value)

Clamp a requested shadow quality to the stable menu/config range.

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `clampShadowQuality`.

View source

configure

function configure(requestedEnabled, requestedShadows, requestedShadowQuality)

Configure the shared native enhanced renderer while preserving Classic as the safe fallback if the active backend cannot create its GPU program.

ParameterTypeDefaultDescription
requestedEnableddynamic—The requested enabled input consumed by `configure`.
requestedShadowsdynamic—The requested shadows input consumed by `configure`.
requestedShadowQualitydynamic—The requested shadow quality input consumed by `configure`.

View source

enabled

enabled

Tracks the module-level enabled state owned by `miniquake.render.enhanced`.

View source

endFrame

function endFrame()

Finalize the enhanced portion of the frame before 2-D rendering begins.

View source

endOverlay

function endOverlay()

Restore compatibility drawing after an enhanced geometry batch.

View source

hasActiveLights

function hasActiveLights()

Report whether this frame contains at least one live dynamic light. The world/entity renderers use this to avoid a black additive replay.

View source

isEnabled

function isEnabled()

Report whether the enhanced path is active for the current frame.

View source

LIGHT_BYTES

const LIGHT_BYTES = LIGHT_FLOATS * 4

Defines the light bytes value used by `miniquake.render.enhanced`.

View source

LIGHT_FLOATS

const LIGHT_FLOATS = 4

Defines the light floats value used by `miniquake.render.enhanced`.

View source

lightPacket

lightPacket

Tracks the module-level light packet state owned by `miniquake.render.enhanced`.

View source

MAX_ENHANCED_LIGHTS

const MAX_ENHANCED_LIGHTS = 16

Keep a bounded dynamic-light packet for the native raster backends without changing Quake's authoritative game state.

View source

putLightFloat

function putLightFloat(offset, value)

Write one IEEE-754 light component without allocating a temporary byte array. Native receives {world x,y,z,radius} records.

ParameterTypeDefaultDescription
offsetdynamic—Zero-based offset of the requested data.
valuedynamic—Value consumed by `putLightFloat`.

View source

selectedLightIndexes

selectedLightIndexes

Tracks the module-level selected light indexes state owned by `miniquake.render.enhanced`.

View source

selectedLightScores

selectedLightScores

Tracks the module-level selected light scores state owned by `miniquake.render.enhanced`.

View source

shadowQuality

function shadowQuality()

Return the clamped enhanced shadow-quality level.

View source

shadowQualityValue

shadowQualityValue

Tracks the module-level shadow quality value state owned by `miniquake.render.enhanced`.

View source

shadowsActive

function shadowsActive()

Report whether enhanced entity/world shadows were requested.

View source

shadowsEnabled

shadowsEnabled

Tracks the module-level shadows enabled state owned by `miniquake.render.enhanced`.

View source

worldLightEligible

function worldLightEligible(light, currentTime, viewOrigin)

Decide whether a dynamic light belongs in the per-pixel world pass. GLQuake treats a camera contained by the inner 35 percent of a flashblend light as a screen tint rather than world geometry. Feeding that same light to the enhanced shader made the local player's randomly sized Quad/EF_DIMLIGHT alternate between an orange world light and the blue powerup cshift.

ParameterTypeDefaultDescription
lightdynamic—The light input consumed by `worldLightEligible`.
currentTimedynamic—Time value used by the operation.
viewOrigindynamic—The view origin input consumed by `worldLightEligible`.

View source