char cubemapname[64];
/// light style to monitor for brightness
int style;
- /// whether light should render shadows
+ /// whether light should render shadows (see castshadows for whether it actually does this frame)
int shadow;
/// intensity of corona to render
vec_t corona;
/// culling
vec3_t cullmins;
vec3_t cullmaxs;
- // culling
- //vec_t cullradius;
- // squared cullradius
- //vec_t cullradius2;
+ /// when r_shadow_culllights_trace is set, this is refreshed by each successful trace.
+ double trace_timer;
// rendering properties, updated each time a light is rendered
// this is rtlight->color * d_lightstylevalue
rtexture_t *currentcubemap;
/// set by R_Shadow_PrepareLight to decide whether R_Shadow_DrawLight should draw it
qboolean draw;
+ /// set by R_Shadow_PrepareLight to indicate whether R_Shadow_DrawShadowMaps should do anything
+ qboolean castshadows;
/// these fields are set by R_Shadow_PrepareLight for later drawing
int cached_numlightentities;
int cached_numlightentities_noselfshadow;
int compiled;
/// the shadowing mode used to compile this light
int shadowmode;
+ /// the size that this light should have (assuming no scene LOD kicking in to reduce it)
+ int shadowmapsidesize;
+ /// position of this light in the shadowmap atlas
+ int shadowmapatlasposition[2];
+ /// 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 shadowmapatlassidesize;
/// premade shadow volumes to render for world entity
shadowmesh_t *static_meshchain_shadow_zpass;
shadowmesh_t *static_meshchain_shadow_zfail;
rtlight_particle_t *particlecache_particles;
/// bouncegrid light info
- float photoncolor[3];
- float photons;
+ float bouncegrid_photoncolor[3];
+ float bouncegrid_photons;
+ int bouncegrid_hits;
+ int bouncegrid_traces;
+ float bouncegrid_effectiveradius;
}
rtlight_t;
double connect_nextsendtime;
lhnetsocket_t *connect_mysocket;
lhnetaddress_t connect_address;
+ lhnetaddress_t rcon_address;
// protocol version of the server we're connected to
// (kept outside client_state_t because it's used between levels)
protocolversion_t protocol;