# aliasAffineModels
aliasAffineModelsTracks the module-level alias affine models state owned by `miniquake.render.entities`.
src/miniquake/render/entities.mlminiquake/array_util.ml as arrayutil → src/miniquake/array_util.mlminiquake/byteio.ml as bio → src/miniquake/byteio.mlminiquake/constants.ml as c → src/miniquake/constants.mlminiquake/mathlib.ml as math → src/miniquake/mathlib.mlminiquake/model_registry.ml as modelRegistry → src/miniquake/model_registry.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/optimization_baseline.ml as optBaseline → src/miniquake/optimization_baseline.mlminiquake/render/alias_mesh.ml as aliasMesh → src/miniquake/render/alias_mesh.mlminiquake/render/draw2d.ml as draw2d → src/miniquake/render/draw2d.mlminiquake/render/enhanced.ml as enhanced → src/miniquake/render/enhanced.mlminiquake/render/gl11.ml as gl → src/miniquake/render/gl11.mlminiquake/render/ray_shadow.ml as rayShadow → src/miniquake/render/ray_shadow.mlminiquake/render/world.ml as worldRenderer → src/miniquake/render/world.mlminiquake/render_ui_contract.ml as renderUiContract → src/miniquake/render_ui_contract.mlminiquake/types.ml as t → src/miniquake/types.mlaliasAffineModelsTracks the module-level alias affine models state owned by `miniquake.render.entities`.
aliasDoubleEyesTracks the module-level alias double eyes state owned by `miniquake.render.entities`.
function aliasFrame(source, frameNumber, time)Implements the `aliasFrame` operation for `miniquake.render.entities` (alias frame).
| Parameter | Type | Default | Description |
|---|---|---|---|
source | dynamic | — | Source value or collection to read. |
frameNumber | dynamic | — | The frame number input consumed by `aliasFrame`. |
time | dynamic | — | Simulation or presentation time for the operation. |
aliasLightingScratchTracks the module-level alias lighting scratch state owned by `miniquake.render.entities`.
function aliasModelCastsShadow(model)Return whether an alias model represents opaque physical geometry. Flames and beam/light effects are alias MDLs in retail Quake rather than sprites; projecting them created bright duplicate torches and energy streaks on the receiver floor on backends that defer fixed-function texture state.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | dynamic | — | Model resource processed by the operation. |
aliasNoColorsTracks the module-level alias no colors state owned by `miniquake.render.entities`.
function aliasPoseBlend(source, entity, currentFrame, time, viewModel)Return [previous pose, current pose, blend fraction] for one render entity. Networked Quake changes MDL frame numbers at the 10 Hz server cadence; this short history removes visible pose stepping without changing simulation.
| Parameter | Type | Default | Description |
|---|---|---|---|
source | dynamic | — | Source value or collection to read. |
entity | dynamic | — | Entity affected by the operation. |
currentFrame | dynamic | — | The current frame input consumed by `aliasPoseBlend`. |
time | dynamic | — | Simulation or presentation time for the operation. |
viewModel | dynamic | — | The view model input consumed by `aliasPoseBlend`. |
aliasPoseChangeTimesTracks the module-level alias pose change times state owned by `miniquake.render.entities`.
aliasPoseCurrentTracks the module-level alias pose current state owned by `miniquake.render.entities`.
aliasPoseInterpolationTracks the module-level alias pose interpolation state owned by `miniquake.render.entities`.
aliasPoseModelsTracks the module-level alias pose models state owned by `miniquake.render.entities`.
aliasPosePreviousTracks the module-level alias pose previous state owned by `miniquake.render.entities`.
function AliasRenderingConfiguration()Implements the `AliasRenderingConfiguration` operation for `miniquake.render.entities` (alias rendering configuration).
function aliasShade(model, entity, time, viewModel)Implements the `aliasShade` operation for `miniquake.render.entities` (alias shade).
| Parameter | Type | Default | Description |
|---|---|---|---|
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
time | dynamic | — | Simulation or presentation time for the operation. |
viewModel | dynamic | — | The view model input consumed by `aliasShade`. |
aliasShadeCacheAmbientTracks the module-level alias shade cache ambient state owned by `miniquake.render.entities`.
aliasShadeCacheColormapTracks the module-level alias shade cache colormap state owned by `miniquake.render.entities`.
aliasShadeCacheModelTracks the module-level alias shade cache model state owned by `miniquake.render.entities`.
aliasShadeCacheOriginXTracks the module-level alias shade cache origin x state owned by `miniquake.render.entities`.
aliasShadeCacheOriginYTracks the module-level alias shade cache origin y state owned by `miniquake.render.entities`.
aliasShadeCacheOriginZTracks the module-level alias shade cache origin z state owned by `miniquake.render.entities`.
aliasShadeCacheReceiverHitTracks the module-level alias shade cache receiver hit state owned by `miniquake.render.entities`.
aliasShadeCacheShadeTracks the module-level alias shade cache shade state owned by `miniquake.render.entities`.
aliasShadeCacheSpotTracks the module-level alias shade cache spot state owned by `miniquake.render.entities`.
aliasShadeCacheStampTracks the module-level alias shade cache stamp state owned by `miniquake.render.entities`.
aliasShadeCacheValidTracks the module-level alias shade cache valid state owned by `miniquake.render.entities`.
aliasShadeCacheViewModelTracks the module-level alias shade cache view model state owned by `miniquake.render.entities`.
aliasShadowQualityTracks the module-level alias shadow quality state owned by `miniquake.render.entities`.
aliasShadowsTracks the module-level alias shadows state owned by `miniquake.render.entities`.
aliasSmoothModelsTracks the module-level alias smooth models state owned by `miniquake.render.entities`.
function aliasVertex(source, packed)Implements the `aliasVertex` operation for `miniquake.render.entities` (alias vertex).
| Parameter | Type | Default | Description |
|---|---|---|---|
source | dynamic | — | Source value or collection to read. |
packed | dynamic | — | The packed input consumed by `aliasVertex`. |
function brushModelIndex(name)Return brush model index derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
function brushRendererForModel(model)Implements the `brushRendererForModel` operation for `miniquake.render.entities` (brush renderer for model).
| Parameter | Type | Default | Description |
|---|---|---|---|
model | dynamic | — | Model resource processed by the operation. |
function brushShadowSource(entity, time)Select the dynamic light with the strongest local contribution and retain its world-space source for BSP ray projection. When no live point light reaches the object, the projector uses a stable directional fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
time | dynamic | — | Simulation or presentation time for the operation. |
brushShadowSourceScratchTracks the module-level brush shadow source scratch state owned by `miniquake.render.entities`.
function ConfigureAliasRendering(smoothModels, affineModels, shadows, noColors, doubleEyes)Update subsystem configuration for configure alias rendering.
| Parameter | Type | Default | Description |
|---|---|---|---|
smoothModels | dynamic | — | The smooth models input consumed by `ConfigureAliasRendering`. |
affineModels | dynamic | — | The affine models input consumed by `ConfigureAliasRendering`. |
shadows | dynamic | — | The shadows input consumed by `ConfigureAliasRendering`. |
noColors | dynamic | — | The no colors input consumed by `ConfigureAliasRendering`. |
doubleEyes | dynamic | — | The double eyes input consumed by `ConfigureAliasRendering`. |
function configureAliasShadowSource(entity, enabled, lightX, lightY, lightZ)Transform the strongest world-space point light into the alias model's yaw-local coordinates used by the projected silhouette routine.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
enabled | dynamic | — | Whether the optional behavior is enabled. |
lightX | dynamic | — | The light x input consumed by `configureAliasShadowSource`. |
lightY | dynamic | — | The light y input consumed by `configureAliasShadowSource`. |
lightZ | dynamic | — | The light z input consumed by `configureAliasShadowSource`. |
function ConfigureEnhancedShadowQuality(value)Configure the backend-neutral projected-shadow sampling level.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `ConfigureEnhancedShadowQuality`. |
function ConfigureModelInterpolation(enabled)Enable or disable temporal interpolation between consecutive MDL poses.
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | dynamic | — | Whether the optional behavior is enabled. |
function create(filesystem, palette, modelPrecache)Implements the `create` operation for `miniquake.render.entities` (create).
| Parameter | Type | Default | Description |
|---|---|---|---|
filesystem | dynamic | — | The filesystem input consumed by `create`. |
palette | dynamic | — | The palette input consumed by `create`. |
modelPrecache | dynamic | — | The model precache input consumed by `create`. |
function cycleIndex(intervals, time, count)Return cycle index derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
intervals | dynamic | — | The intervals input consumed by `cycleIndex`. |
time | dynamic | — | Simulation or presentation time for the operation. |
count | dynamic | — | Number of entries or units to process. |
function destroy(renderer)Implements the `destroy` operation for `miniquake.render.entities` (destroy).
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function drawAlias(renderer, model, entity, time, viewModel, enhancedOverlay)Render alias.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
time | dynamic | — | Simulation or presentation time for the operation. |
viewModel | dynamic | — | The view model input consumed by `drawAlias`. |
enhancedOverlay | dynamic | — | The enhanced overlay input consumed by `drawAlias`. |
function drawBrush(worldRendererValue, model, entity, time)Render brush.
| Parameter | Type | Default | Description |
|---|---|---|---|
worldRendererValue | dynamic | — | The world renderer value input consumed by `drawBrush`. |
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
time | dynamic | — | Simulation or presentation time for the operation. |
function drawBrushEnhanced(worldRendererValue, model, entity, time)Render one brush entity without its classic lightmap pass so the optional additive GPU program can light the geometry exactly once.
| Parameter | Type | Default | Description |
|---|---|---|---|
worldRendererValue | dynamic | — | The world renderer value input consumed by `drawBrushEnhanced`. |
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
time | dynamic | — | Simulation or presentation time for the operation. |
function drawBrushShadow(worldRendererValue, model, entity, time)Render a backend-neutral soft footprint for BSP pickups, crates, doors and platforms. Sprite effects stay emissive and intentionally cast no shadow.
| Parameter | Type | Default | Description |
|---|---|---|---|
worldRendererValue | dynamic | — | The world renderer value input consumed by `drawBrushShadow`. |
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
time | dynamic | — | Simulation or presentation time for the operation. |
function drawBrushShadowSample(worldRendererValue, model, entity, floorWorldZ, source, offsetX, offsetY, contactOnly)Draw one projected footprint sample for either an external pickup BSP or an inline moving brush model.
| Parameter | Type | Default | Description |
|---|---|---|---|
worldRendererValue | dynamic | — | The world renderer value input consumed by `drawBrushShadowSample`. |
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
floorWorldZ | dynamic | — | The floor world z input consumed by `drawBrushShadowSample`. |
source | dynamic | — | Source value or collection to read. |
offsetX | dynamic | — | The offset x input consumed by `drawBrushShadowSample`. |
offsetY | dynamic | — | The offset y input consumed by `drawBrushShadowSample`. |
contactOnly | dynamic | — | The contact only input consumed by `drawBrushShadowSample`. |
function drawSprite(renderer, model, entity, viewRight, viewUp, time)Render sprite.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
viewRight | dynamic | — | The view right input consumed by `drawSprite`. |
viewUp | dynamic | — | The view up input consumed by `drawSprite`. |
time | dynamic | — | Simulation or presentation time for the operation. |
function emptyModel(name, kind)Implements the `emptyModel` operation for `miniquake.render.entities` (empty model).
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
kind | dynamic | — | The kind input consumed by `emptyModel`. |
function endsWithInsensitive(text, suffix)Finalize state for ends with insensitive.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
suffix | dynamic | — | The suffix input consumed by `endsWithInsensitive`. |
function externalBrushForName(name)Return external brush for name derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
externalBrushRendererNamesTracks the module-level external brush renderer names state owned by `miniquake.render.entities`.
externalBrushRendererRootsRoot complete external renderers (map, textures, surfaces and lightmaps) for the lifetime of the entity renderer. These are independent BSP models and therefore are not owned by the active WorldRenderer.
function finishEnhancedEntityOverlay()Restore compatibility blend/depth state after any enhanced entity replay, including error exits from malformed external models.
function loadModel(renderer, name)Read and validate model.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
name | dynamic | — | Stable name that identifies the requested object or option. |
function loadWorldModel(renderer, name)Read and validate world model.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
name | dynamic | — | Stable name that identifies the requested object or option. |
const MODEL_ALIAS = 2Defines the model alias value used by `miniquake.render.entities`.
const MODEL_BRUSH = 1Defines the model brush value used by `miniquake.render.entities`.
const MODEL_NONE = 0Defines the model none value used by `miniquake.render.entities`.
const MODEL_SPRITE = 3Defines the model sprite value used by `miniquake.render.entities`.
function objectShadowFloorZ(worldRendererValue, entity)Resolve a stable receiver height from the main BSP beneath an object. A production miss must suppress the shadow: lightspot retains reusable storage and may still contain another entity's receiver from an earlier trace.
| Parameter | Type | Default | Description |
|---|---|---|---|
worldRendererValue | dynamic | — | The world renderer value input consumed by `objectShadowFloorZ`. |
entity | dynamic | — | Entity affected by the operation. |
function precache(renderer)Preload and register the the requested value asset.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
function render(renderer, worldRendererValue, entities, viewEntity, viewRight, viewUp, time)Implements the `render` operation for `miniquake.render.entities` (render).
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
worldRendererValue | dynamic | — | The world renderer value input consumed by `render`. |
entities | dynamic | — | The entities input consumed by `render`. |
viewEntity | dynamic | — | The view entity input consumed by `render`. |
viewRight | dynamic | — | The view right input consumed by `render`. |
viewUp | dynamic | — | The view up input consumed by `render`. |
time | dynamic | — | Simulation or presentation time for the operation. |
renderModelRegistryTracks the module-level render model registry state owned by `miniquake.render.entities`.
function renderViewModel(renderer, player, view, time)Render view model.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
player | dynamic | — | The player input consumed by `renderViewModel`. |
view | dynamic | — | The view input consumed by `renderViewModel`. |
time | dynamic | — | Simulation or presentation time for the operation. |
function renderViewModelEnhanced(renderer, player, view, time)Add per-pixel dynamic light to the first-person weapon using the same compressed depth range as the classic viewmodel draw.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
player | dynamic | — | The player input consumed by `renderViewModelEnhanced`. |
view | dynamic | — | The view input consumed by `renderViewModelEnhanced`. |
time | dynamic | — | Simulation or presentation time for the operation. |
function resetAliasPoseCache()Reset per-entity MDL pose history at every map/renderer transition.
function resetAliasShadeCache()Update module state for alias shade cache.
function setTranslatedPlayerTexture(entityNumber, texture)Update module state for translated player texture.
| Parameter | Type | Default | Description |
|---|---|---|---|
entityNumber | dynamic | — | The entity number input consumed by `setTranslatedPlayerTexture`. |
texture | dynamic | — | Texture resource processed by the operation. |
const SPR_ORIENTED = 3Defines the spr oriented value used by `miniquake.render.entities`.
function spriteFrameAndTexture(model, entity, time)Implements the `spriteFrameAndTexture` operation for `miniquake.render.entities` (sprite frame and texture).
| Parameter | Type | Default | Description |
|---|---|---|---|
model | dynamic | — | Model resource processed by the operation. |
entity | dynamic | — | Entity affected by the operation. |
time | dynamic | — | Simulation or presentation time for the operation. |
function startsWith(text, prefix)Starts s with for `miniquake.render.entities`.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
prefix | dynamic | — | The prefix input consumed by `startsWith`. |
function synchronize(renderer, modelPrecache)Update module state for the requested value.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
modelPrecache | dynamic | — | The model precache input consumed by `synchronize`. |
inline function translatedPlayerTexture(entityNumber)Implements the `translatedPlayerTexture` operation for `miniquake.render.entities` (translated player texture).
| Parameter | Type | Default | Description |
|---|---|---|---|
entityNumber | dynamic | — | The entity number input consumed by `translatedPlayerTexture`. |
translatedPlayerTexturesTracks the module-level translated player textures state owned by `miniquake.render.entities`.
function upload(renderer, model)Upload the requested value to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
model | dynamic | — | Model resource processed by the operation. |
function uploadAlias(renderer, model)Upload alias to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
model | dynamic | — | Model resource processed by the operation. |
function uploadIndexedTexture(width, height, pixels, palette, transparent)Upload indexed texture to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
width | dynamic | — | Requested width in pixels or data units. |
height | dynamic | — | Requested height in pixels or data units. |
pixels | dynamic | — | The pixels input consumed by `uploadIndexedTexture`. |
palette | dynamic | — | The palette input consumed by `uploadIndexedTexture`. |
transparent | dynamic | — | The transparent input consumed by `uploadIndexedTexture`. |
function uploadSprite(renderer, model)Upload sprite to the active renderer.
| Parameter | Type | Default | Description |
|---|---|---|---|
renderer | dynamic | — | Renderer instance or backend used for drawing. |
model | dynamic | — | Model resource processed by the operation. |
function viewModelDepthRange(depthMin, depthMax)R_DrawViewModel / V_CalcRefdef. The gun is a normal alias model drawn from the view entity, with a compressed depth range so it cannot poke through nearby world surfaces.
| Parameter | Type | Default | Description |
|---|---|---|---|
depthMin | dynamic | — | The depth min input consumed by `viewModelDepthRange`. |
depthMax | dynamic | — | The depth max input consumed by `viewModelDepthRange`. |
viewModelScratchTracks the module-level view model scratch state owned by `miniquake.render.entities`.