DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
rtlight_t Struct Reference

#include <client.h>

+ Collaboration diagram for rtlight_t:

Data Fields

vec_t ambientscale
 ambient intensity to render
 
float bouncegrid_effectiveradius
 
int bouncegrid_hits
 
float bouncegrid_photoncolor [3]
 bouncegrid light info
 
float bouncegrid_photons
 
int bouncegrid_traces
 
vec3_t cached_cullmaxs
 
vec3_t cached_cullmins
 
mplane_t cached_frustumplanes [5]
 
struct entity_render_s ** cached_lightentities
 
struct entity_render_s ** cached_lightentities_noselfshadow
 
unsigned char * cached_lighttrispvs
 
int cached_numfrustumplanes
 
int cached_numlightentities
 these fields are set by R_Shadow_PrepareLight for later drawing
 
int cached_numlightentities_noselfshadow
 
int cached_numshadowentities
 
int cached_numshadowentities_noselfshadow
 
int cached_numsurfaces
 
struct entity_render_s ** cached_shadowentities
 
struct entity_render_s ** cached_shadowentities_noselfshadow
 
unsigned char * cached_shadowtrispvs
 
intcached_surfacelist
 
qbool castshadows
 set by R_Shadow_PrepareLight to indicate whether R_Shadow_DrawShadowMaps should do anything
 
vec3_t color
 typically 1 1 1, can be lower (dim) or higher (overbright)
 
int compiled
 true if this is a compiled world light, cleared if the light changes
 
vec_t corona
 intensity of corona to render
 
unsigned int corona_queryindex_allpixels
 
unsigned int corona_queryindex_visiblepixels
 
float corona_visibility
 used by corona updates, due to occlusion query
 
vec_t coronasizescale
 radius scale of corona to render (1.0 means same as light radius)
 
char cubemapname [64]
 light filter
 
vec3_t cullmaxs
 
vec3_t cullmins
 culling
 
vec3_t currentcolor
 
rtexture_tcurrentcubemap
 this is R_GetCubemap(rtlight->cubemapname)
 
vec_t diffusescale
 diffuse intensity to render
 
qbool draw
 set by R_Shadow_PrepareLight to decide whether R_Shadow_DrawLight should draw it
 
int flags
 LIGHTFLAG_* flags.
 
int isstatic
 static light info true if this light should be compiled as a static light
 
matrix4x4_t matrix_lighttoworld
 matrix for transforming light filter coordinates to world coordinates
 
matrix4x4_t matrix_worldtolight
 matrix for transforming world coordinates to light filter coordinates
 
int particlecache_maxparticles
 
int particlecache_numparticles
 particle-tracing cache for global illumination
 
rtlight_particle_tparticlecache_particles
 
int particlecache_updateparticle
 
vec_t radius
 size of the light (remove?)
 
int shadow
 whether light should render shadows (see castshadows for whether it actually does this frame)
 
int shadowmapatlasposition [2]
 position of this light in the shadowmap atlas
 
int shadowmapatlassidesize
 size of one side of this light in the shadowmap atlas (for omnidirectional shadowmaps this is the min corner of a 2x3 arrangement, or a 4x3 arrangement in the case of noselfshadow entities being present)
 
int shadowmapsidesize
 the size that this light should have (assuming no scene LOD kicking in to reduce it)
 
vec3_t shadoworigin
 used only for casting shadows
 
vec_t specularscale
 specular intensity to render
 
intstatic_leaflist
 
unsigned char * static_leafpvs
 
unsigned char * static_lighttrispvs
 
shadowmesh_tstatic_meshchain_shadow_shadowmap
 optimized and culled mesh to render for world entity shadows
 
int static_numleafpvsbytes
 
int static_numleafs
 used for visibility testing (more exact than bbox)
 
int static_numlighttrispvsbytes
 this allows the lighting batch code to skip backfaces andother culled triangles not relevant for lighting (important on big surfaces such as terrain)
 
int static_numshadowtrispvsbytes
 flag bits indicating which triangles of the world model should cast shadows, and which ones should be lit
 
int static_numsurfaces
 surfaces seen by light
 
int static_shadowmap_casters
 
int static_shadowmap_receivers
 masks of all shadowmap sides that have any potential static receivers or casters
 
unsigned char * static_shadowtrispvs
 
intstatic_surfacelist
 
int style
 light style to monitor for brightness
 
double trace_timer
 when r_shadow_culllights_trace is set, this is refreshed by each successful trace.
 

Detailed Description

Definition at line 104 of file client.h.

Field Documentation

◆ ambientscale

◆ bouncegrid_effectiveradius

float rtlight_t::bouncegrid_effectiveradius

◆ bouncegrid_hits

int rtlight_t::bouncegrid_hits

◆ bouncegrid_photoncolor

float rtlight_t::bouncegrid_photoncolor[3]

bouncegrid light info

Definition at line 224 of file client.h.

Referenced by R_Shadow_BounceGrid_AssignPhotons_Task(), and R_Shadow_EditLights_DrawSelectedLightProperties().

◆ bouncegrid_photons

float rtlight_t::bouncegrid_photons

◆ bouncegrid_traces

int rtlight_t::bouncegrid_traces

◆ cached_cullmaxs

◆ cached_cullmins

◆ cached_frustumplanes

mplane_t rtlight_t::cached_frustumplanes[5]

Definition at line 178 of file client.h.

Referenced by R_Shadow_ComputeShadowCasterCullingPlanes(), and R_Shadow_PrepareLight().

◆ cached_lightentities

struct entity_render_s** rtlight_t::cached_lightentities

◆ cached_lightentities_noselfshadow

struct entity_render_s** rtlight_t::cached_lightentities_noselfshadow

◆ cached_lighttrispvs

unsigned char* rtlight_t::cached_lighttrispvs

Definition at line 169 of file client.h.

Referenced by R_Shadow_DrawLight(), and R_Shadow_PrepareLight().

◆ cached_numfrustumplanes

int rtlight_t::cached_numfrustumplanes

Definition at line 177 of file client.h.

Referenced by R_Shadow_ComputeShadowCasterCullingPlanes(), and R_Shadow_PrepareLight().

◆ cached_numlightentities

int rtlight_t::cached_numlightentities

these fields are set by R_Shadow_PrepareLight for later drawing

Definition at line 159 of file client.h.

Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), R_Shadow_EditLights_DrawSelectedLightProperties(), and R_Shadow_PrepareLight().

◆ cached_numlightentities_noselfshadow

int rtlight_t::cached_numlightentities_noselfshadow

◆ cached_numshadowentities

int rtlight_t::cached_numshadowentities

◆ cached_numshadowentities_noselfshadow

int rtlight_t::cached_numshadowentities_noselfshadow

◆ cached_numsurfaces

◆ cached_shadowentities

struct entity_render_s** rtlight_t::cached_shadowentities

Definition at line 166 of file client.h.

Referenced by R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().

◆ cached_shadowentities_noselfshadow

struct entity_render_s** rtlight_t::cached_shadowentities_noselfshadow

Definition at line 167 of file client.h.

Referenced by R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().

◆ cached_shadowtrispvs

unsigned char* rtlight_t::cached_shadowtrispvs

Definition at line 168 of file client.h.

Referenced by R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().

◆ cached_surfacelist

int* rtlight_t::cached_surfacelist

◆ castshadows

qbool rtlight_t::castshadows

set by R_Shadow_PrepareLight to indicate whether R_Shadow_DrawShadowMaps should do anything

Definition at line 157 of file client.h.

Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), R_Shadow_PrepareLight(), and R_Shadow_PrepareLights().

◆ color

vec3_t rtlight_t::color

typically 1 1 1, can be lower (dim) or higher (overbright)

Definition at line 114 of file client.h.

Referenced by R_RTLight_Update(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_GetRTLightInfo(), R_Shadow_PrepareLight(), and R_Shadow_PrepareLights().

◆ compiled

int rtlight_t::compiled

true if this is a compiled world light, cleared if the light changes

Definition at line 184 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), R_Shadow_DrawLightShadowMaps(), R_Shadow_DrawWorldShadow_ShadowMap(), and R_Shadow_PrepareLight().

◆ corona

vec_t rtlight_t::corona

intensity of corona to render

Definition at line 124 of file client.h.

Referenced by R_RTLight_Update(), and R_Shadow_DrawCoronas().

◆ corona_queryindex_allpixels

unsigned int rtlight_t::corona_queryindex_allpixels

Definition at line 151 of file client.h.

Referenced by R_BeginCoronaQuery(), R_DrawCorona(), and R_Shadow_DrawCoronas().

◆ corona_queryindex_visiblepixels

unsigned int rtlight_t::corona_queryindex_visiblepixels

Definition at line 150 of file client.h.

Referenced by R_BeginCoronaQuery(), R_DrawCorona(), and R_Shadow_DrawCoronas().

◆ corona_visibility

float rtlight_t::corona_visibility

used by corona updates, due to occlusion query

Definition at line 149 of file client.h.

Referenced by R_BeginCoronaQuery(), R_DrawCorona(), and R_Shadow_DrawCoronas().

◆ coronasizescale

vec_t rtlight_t::coronasizescale

radius scale of corona to render (1.0 means same as light radius)

Definition at line 126 of file client.h.

Referenced by R_RTLight_Update(), and R_Shadow_DrawCoronas().

◆ cubemapname

char rtlight_t::cubemapname[64]

light filter

Definition at line 118 of file client.h.

Referenced by R_RTLight_Update(), and R_Shadow_PrepareLight().

◆ cullmaxs

◆ cullmins

◆ currentcolor

◆ currentcubemap

rtexture_t* rtlight_t::currentcubemap

this is R_GetCubemap(rtlight->cubemapname)

Definition at line 153 of file client.h.

Referenced by R_SetupShader_DeferredLight(), R_SetupShader_Surface(), and R_Shadow_PrepareLight().

◆ diffusescale

◆ draw

qbool rtlight_t::draw

set by R_Shadow_PrepareLight to decide whether R_Shadow_DrawLight should draw it

Definition at line 155 of file client.h.

Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().

◆ flags

int rtlight_t::flags

LIGHTFLAG_* flags.

Definition at line 134 of file client.h.

Referenced by R_CompleteLightPoint(), R_RTLight_Update(), and R_Shadow_DrawCoronas().

◆ isstatic

int rtlight_t::isstatic

static light info true if this light should be compiled as a static light

Definition at line 182 of file client.h.

Referenced by R_RTLight_Update(), and R_Shadow_PrepareLight().

◆ matrix_lighttoworld

matrix4x4_t rtlight_t::matrix_lighttoworld

◆ matrix_worldtolight

matrix4x4_t rtlight_t::matrix_worldtolight

matrix for transforming world coordinates to light filter coordinates

Definition at line 112 of file client.h.

Referenced by R_Mod_CompileShadowMap(), R_RTLight_Update(), R_Shadow_CullFrustumSides(), R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), R_Shadow_DrawWorldLight(), and R_Shadow_SetupEntityLight().

◆ particlecache_maxparticles

int rtlight_t::particlecache_maxparticles

Definition at line 219 of file client.h.

◆ particlecache_numparticles

int rtlight_t::particlecache_numparticles

particle-tracing cache for global illumination

Definition at line 218 of file client.h.

◆ particlecache_particles

rtlight_particle_t* rtlight_t::particlecache_particles

Definition at line 221 of file client.h.

◆ particlecache_updateparticle

int rtlight_t::particlecache_updateparticle

Definition at line 220 of file client.h.

◆ radius

◆ shadow

int rtlight_t::shadow

whether light should render shadows (see castshadows for whether it actually does this frame)

Definition at line 122 of file client.h.

Referenced by R_CompleteLightPoint(), R_RTLight_Compile(), R_RTLight_Update(), and R_Shadow_PrepareLight().

◆ shadowmapatlasposition

int rtlight_t::shadowmapatlasposition[2]

position of this light in the shadowmap atlas

Definition at line 188 of file client.h.

Referenced by R_Shadow_DrawLightShadowMaps(), R_Shadow_PrepareLights(), and R_Shadow_SetShadowmapParametersForLight().

◆ shadowmapatlassidesize

int rtlight_t::shadowmapatlassidesize

size of one side of this light in the shadowmap atlas (for omnidirectional shadowmaps this is the min corner of a 2x3 arrangement, or a 4x3 arrangement in the case of noselfshadow entities being present)

Definition at line 190 of file client.h.

Referenced by R_Q1BSP_DrawLight_TransparentCallback(), R_Shadow_DrawLightShadowMaps(), R_Shadow_EditLights_DrawSelectedLightProperties(), R_Shadow_PrepareLights(), and R_Shadow_SetShadowmapParametersForLight().

◆ shadowmapsidesize

int rtlight_t::shadowmapsidesize

the size that this light should have (assuming no scene LOD kicking in to reduce it)

Definition at line 186 of file client.h.

Referenced by R_Shadow_PrepareLight(), and R_Shadow_PrepareLights().

◆ shadoworigin

◆ specularscale

◆ static_leaflist

int* rtlight_t::static_leaflist

Definition at line 196 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), and R_Shadow_PrepareLight().

◆ static_leafpvs

unsigned char* rtlight_t::static_leafpvs

Definition at line 197 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), and R_Shadow_PrepareLight().

◆ static_lighttrispvs

unsigned char* rtlight_t::static_lighttrispvs

Definition at line 213 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), and R_Shadow_PrepareLight().

◆ static_meshchain_shadow_shadowmap

shadowmesh_t* rtlight_t::static_meshchain_shadow_shadowmap

optimized and culled mesh to render for world entity shadows

Definition at line 192 of file client.h.

Referenced by R_Mod_CompileShadowMap(), R_RTLight_Uncompile(), R_Shadow_DrawWorldShadow_ShadowMap(), and R_Shadow_ShadowMapFromList().

◆ static_numleafpvsbytes

int rtlight_t::static_numleafpvsbytes

Definition at line 195 of file client.h.

Referenced by R_RTLight_Compile(), and R_RTLight_Uncompile().

◆ static_numleafs

int rtlight_t::static_numleafs

used for visibility testing (more exact than bbox)

Definition at line 194 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), and R_Shadow_PrepareLight().

◆ static_numlighttrispvsbytes

int rtlight_t::static_numlighttrispvsbytes

this allows the lighting batch code to skip backfaces andother culled triangles not relevant for lighting (important on big surfaces such as terrain)

Definition at line 212 of file client.h.

Referenced by R_RTLight_Compile(), and R_RTLight_Uncompile().

◆ static_numshadowtrispvsbytes

int rtlight_t::static_numshadowtrispvsbytes

flag bits indicating which triangles of the world model should cast shadows, and which ones should be lit

this avoids redundantly scanning the triangles in each surface twice for whether they should cast shadows, once in culling and once in the actual shadowmarklist production.

Definition at line 207 of file client.h.

Referenced by R_RTLight_Compile(), and R_RTLight_Uncompile().

◆ static_numsurfaces

int rtlight_t::static_numsurfaces

surfaces seen by light

Definition at line 199 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), and R_Shadow_PrepareLight().

◆ static_shadowmap_casters

int rtlight_t::static_shadowmap_casters

◆ static_shadowmap_receivers

int rtlight_t::static_shadowmap_receivers

masks of all shadowmap sides that have any potential static receivers or casters

Definition at line 215 of file client.h.

Referenced by R_Mod_CompileShadowMap(), R_RTLight_Compile(), and R_Shadow_DrawLightShadowMaps().

◆ static_shadowtrispvs

unsigned char* rtlight_t::static_shadowtrispvs

Definition at line 208 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), and R_Shadow_PrepareLight().

◆ static_surfacelist

int* rtlight_t::static_surfacelist

Definition at line 200 of file client.h.

Referenced by R_RTLight_Compile(), R_RTLight_Uncompile(), and R_Shadow_PrepareLight().

◆ style

int rtlight_t::style

◆ trace_timer

double rtlight_t::trace_timer

when r_shadow_culllights_trace is set, this is refreshed by each successful trace.

Definition at line 143 of file client.h.

Referenced by R_Shadow_BounceGrid_AssignPhotons_Task(), and R_Shadow_PrepareLight().


The documentation for this struct was generated from the following file: