![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include <client.h>
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 |
int * | cached_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_t * | currentcubemap |
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_t * | particlecache_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 | |
int * | static_leaflist |
unsigned char * | static_leafpvs |
unsigned char * | static_lighttrispvs |
shadowmesh_t * | static_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 |
int * | static_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. | |
vec_t rtlight_t::ambientscale |
ambient intensity to render
Definition at line 128 of file client.h.
Referenced by R_RTLight_Update(), R_SetupShader_DeferredLight(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_PrepareLight(), and R_Shadow_RenderLighting().
float rtlight_t::bouncegrid_effectiveradius |
Definition at line 228 of file client.h.
Referenced by R_Shadow_BounceGrid_AssignPhotons_Task(), and R_Shadow_EditLights_DrawSelectedLightProperties().
int rtlight_t::bouncegrid_hits |
Definition at line 226 of file client.h.
Referenced by R_Shadow_BounceGrid_AssignPhotons_Task(), and R_Shadow_EditLights_DrawSelectedLightProperties().
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().
float rtlight_t::bouncegrid_photons |
Definition at line 225 of file client.h.
Referenced by R_Shadow_BounceGrid_AssignPhotons_Task(), and R_Shadow_EditLights_DrawSelectedLightProperties().
int rtlight_t::bouncegrid_traces |
Definition at line 227 of file client.h.
Referenced by R_Shadow_BounceGrid_AssignPhotons_Task(), and R_Shadow_EditLights_DrawSelectedLightProperties().
vec3_t rtlight_t::cached_cullmaxs |
Definition at line 173 of file client.h.
Referenced by R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), R_Shadow_DrawWorldShadow_ShadowMap(), and R_Shadow_PrepareLight().
vec3_t rtlight_t::cached_cullmins |
Definition at line 172 of file client.h.
Referenced by R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), R_Shadow_DrawWorldShadow_ShadowMap(), and R_Shadow_PrepareLight().
mplane_t rtlight_t::cached_frustumplanes[5] |
Definition at line 178 of file client.h.
Referenced by R_Shadow_ComputeShadowCasterCullingPlanes(), and R_Shadow_PrepareLight().
struct entity_render_s** rtlight_t::cached_lightentities |
Definition at line 164 of file client.h.
Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().
struct entity_render_s** rtlight_t::cached_lightentities_noselfshadow |
Definition at line 165 of file client.h.
Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().
unsigned char* rtlight_t::cached_lighttrispvs |
Definition at line 169 of file client.h.
Referenced by R_Shadow_DrawLight(), and R_Shadow_PrepareLight().
int rtlight_t::cached_numfrustumplanes |
Definition at line 177 of file client.h.
Referenced by R_Shadow_ComputeShadowCasterCullingPlanes(), and R_Shadow_PrepareLight().
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().
int rtlight_t::cached_numlightentities_noselfshadow |
Definition at line 160 of file client.h.
Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), R_Shadow_EditLights_DrawSelectedLightProperties(), and R_Shadow_PrepareLight().
int rtlight_t::cached_numshadowentities |
Definition at line 161 of file client.h.
Referenced by R_Shadow_DrawLightShadowMaps(), R_Shadow_EditLights_DrawSelectedLightProperties(), and R_Shadow_PrepareLight().
int rtlight_t::cached_numshadowentities_noselfshadow |
Definition at line 162 of file client.h.
Referenced by R_Shadow_DrawLightShadowMaps(), R_Shadow_EditLights_DrawSelectedLightProperties(), R_Shadow_PrepareLight(), and R_Shadow_PrepareLights().
int rtlight_t::cached_numsurfaces |
Definition at line 163 of file client.h.
Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), R_Shadow_EditLights_DrawSelectedLightProperties(), and R_Shadow_PrepareLight().
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().
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().
unsigned char* rtlight_t::cached_shadowtrispvs |
Definition at line 168 of file client.h.
Referenced by R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().
int* rtlight_t::cached_surfacelist |
Definition at line 170 of file client.h.
Referenced by R_Shadow_DrawLight(), R_Shadow_DrawLightShadowMaps(), and R_Shadow_PrepareLight().
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().
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().
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().
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().
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().
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().
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().
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().
char rtlight_t::cubemapname[64] |
light filter
Definition at line 118 of file client.h.
Referenced by R_RTLight_Update(), and R_Shadow_PrepareLight().
vec3_t rtlight_t::cullmaxs |
Definition at line 141 of file client.h.
Referenced by R_Mod_CompileShadowMap(), R_RTLight_Compile(), R_RTLight_Update(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_UpdateSpacing(), and R_Shadow_PrepareLight().
vec3_t rtlight_t::cullmins |
culling
Definition at line 140 of file client.h.
Referenced by R_Mod_CompileShadowMap(), R_RTLight_Compile(), R_RTLight_Update(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_UpdateSpacing(), and R_Shadow_PrepareLight().
vec3_t rtlight_t::currentcolor |
Definition at line 147 of file client.h.
Referenced by R_BeginCoronaQuery(), R_CompleteLightPoint(), R_DrawCorona(), R_SetupShader_DeferredLight(), R_Shadow_EditLights_DrawSelectedLightProperties(), R_Shadow_PrepareLight(), R_Shadow_PrepareLights(), and R_Shadow_RenderLighting().
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().
vec_t rtlight_t::diffusescale |
diffuse intensity to render
Definition at line 130 of file client.h.
Referenced by R_RTLight_Update(), R_SetupShader_DeferredLight(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_PrepareLight(), and R_Shadow_RenderLighting().
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().
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().
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().
matrix4x4_t rtlight_t::matrix_lighttoworld |
matrix for transforming light filter coordinates to world coordinates
Definition at line 110 of file client.h.
Referenced by R_RTLight_Update(), R_SetupShader_DeferredLight(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_CullFrustumSides(), R_Shadow_RenderMode_DrawDeferredLight(), and R_Shadow_RenderMode_ShadowMap().
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().
int rtlight_t::particlecache_numparticles |
rtlight_particle_t* rtlight_t::particlecache_particles |
vec_t rtlight_t::radius |
size of the light (remove?)
Definition at line 116 of file client.h.
Referenced by R_CompleteLightPoint(), R_RTLight_Compile(), R_RTLight_Update(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_DrawCoronas(), R_Shadow_DrawEntityShadow(), R_Shadow_DrawWorldShadow_ShadowMap(), R_Shadow_GetRTLightInfo(), R_Shadow_PrepareLight(), R_Shadow_RenderMode_ShadowMap(), and R_Shadow_SetShadowmapParametersForLight().
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().
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().
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().
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().
vec3_t rtlight_t::shadoworigin |
used only for casting shadows
Definition at line 138 of file client.h.
Referenced by R_BeginCoronaQuery(), R_CompleteLightPoint(), R_DrawCorona(), R_RTLight_Compile(), R_RTLight_Update(), R_SetupShader_DeferredLight(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_DrawEntityShadow(), R_Shadow_DrawWorldLight(), R_Shadow_DrawWorldShadow_ShadowMap(), R_Shadow_GetRTLightInfo(), R_Shadow_PrepareLight(), and R_Shadow_SetupEntityLight().
vec_t rtlight_t::specularscale |
specular intensity to render
Definition at line 132 of file client.h.
Referenced by R_RTLight_Update(), R_SetupShader_DeferredLight(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_PrepareLight(), R_Shadow_RenderLighting(), and R_Shadow_RenderMode_DrawDeferredLight().
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().
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().
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().
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().
int rtlight_t::static_numleafpvsbytes |
Definition at line 195 of file client.h.
Referenced by R_RTLight_Compile(), and R_RTLight_Uncompile().
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().
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().
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().
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().
int rtlight_t::static_shadowmap_casters |
Definition at line 216 of file client.h.
Referenced by R_Mod_CompileShadowMap(), R_RTLight_Compile(), and R_Shadow_DrawLightShadowMaps().
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().
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().
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().
int rtlight_t::style |
light style to monitor for brightness
Definition at line 120 of file client.h.
Referenced by R_RTLight_Update(), R_Shadow_BounceGrid_AssignPhotons_Task(), R_Shadow_BounceGrid_CheckEnable(), R_Shadow_PrepareLight(), and R_Shadow_PrepareLights().
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().