Skip to content

DefaultEntityLighting

Narta Xaymar Dirks edited this page Dec 3, 2026 · 1 revision

DefaultEntityLighting BlitzLLVM

DefaultEntityLighting:Void mode:Int32
Parameter Mode Type Default Description
mode In Int32 required 0 for lighting of the vertices as the original does it (the start value), 1 for lighting of every pixel.

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

Sets the EntityLighting mode of every entity that was not given one of its own. This is a BlitzLLVM extension.

Each entity has its own lighting mode, and entities that never had EntityLighting called on them use this default. That includes the children of models from LoadAnimMesh, copies from CopyEntity, and terrains, so one call switches a whole game between lighting the vertices (as the original does) and lighting every pixel, which is what a "Lighting: Vertex / Pixel" option in a game's graphics settings needs. The change reaches all of these entities at the next RenderWorld, including the ones that already exist; nothing has to walk the children of models or load them again.

Entities that were given a mode with EntityLighting keep it, whatever the default is. Copies made by CopyEntity of such an entity keep it too.

The default starts as 0, or as 1 if the environment variable BLITZLLVM_ENTITY_LIGHTING is 1. GetDefaultEntityLighting returns it.

Differences

  • Not in the original: lighting is always per vertex there.

Examples

; A graphics setting that switches the lighting of everything the game loads or has loaded.
If pixelLighting Then DefaultEntityLighting 1 Else DefaultEntityLighting 0

Related Commands

CopyEntity Blitz3D, EntityAlpha Blitz3D, EntityAutoFade Blitz3D, EntityBlend Blitz3D, EntityClass Blitz3D, EntityColor Blitz3D, EntityLighting BlitzLLVM, GetDefaultEntityLighting BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally