static void R_Shadow_RenderMode_ShadowMap(int side, int size, int x, int y)
{
- float nearclip, farclip, bias;
+ float nearclip, farclip;
r_viewport_t viewport;
int flipped;
nearclip = r_shadow_shadowmapping_nearclip.value / rsurface.rtlight->radius;
farclip = 1.0f;
- bias = r_shadow_shadowmapping_bias.value * nearclip * (1024.0f / size);// * rsurface.rtlight->radius;
R_Viewport_InitRectSideView(&viewport, &rsurface.rtlight->matrix_lighttoworld, side, size, r_shadow_shadowmapborder, nearclip, farclip, NULL, x, y);
R_SetViewport(&viewport);
r_shadow_bouncegrid_state.lastupdatetime = realtime;
}
-void R_Shadow_BounceGrid_ClearTex_Task(taskqueue_task_t *t)
+static void R_Shadow_BounceGrid_ClearTex_Task(taskqueue_task_t *t)
{
memset(r_shadow_bouncegrid_state.highpixels, 0, r_shadow_bouncegrid_state.numpixels * sizeof(float[4]));
t->done = 1;
int numlightentities_noselfshadow;
entity_render_t **lightentities;
entity_render_t **lightentities_noselfshadow;
- entity_render_t **shadowentities;
- entity_render_t **shadowentities_noselfshadow;
int *surfacelist;
qboolean castshadows;
numsurfaces = rtlight->cached_numsurfaces;
lightentities = rtlight->cached_lightentities;
lightentities_noselfshadow = rtlight->cached_lightentities_noselfshadow;
- shadowentities = rtlight->cached_shadowentities;
- shadowentities_noselfshadow = rtlight->cached_shadowentities_noselfshadow;
lighttrispvs = rtlight->cached_lighttrispvs;
surfacelist = rtlight->cached_surfacelist;
castshadows = rtlight->castshadows;
if (castshadows && r_shadow_shadowmode == R_SHADOW_SHADOWMODE_SHADOWMAP2D)
{
- float borderbias;
- int size;
matrix4x4_t radiustolight = rtlight->matrix_worldtolight;
Matrix4x4_Abs(&radiustolight);
- size = rtlight->shadowmapatlassidesize;
- borderbias = r_shadow_shadowmapborder / (float)(size - r_shadow_shadowmapborder);
-
//Con_Printf("distance %f lodlinear %i size %i\n", distance, lodlinear, size);
// render lighting using the depth texture as shadowmap
}
#define MAX_SCENELIGHTS 65536
-qboolean R_Shadow_PrepareLights_AddSceneLight(rtlight_t *rtlight)
+static qboolean R_Shadow_PrepareLights_AddSceneLight(rtlight_t *rtlight)
{
if (r_shadow_scenemaxlights <= r_shadow_scenenumlights)
{