mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-18 07:21:31 +00:00
[renderer] Move r_framecount update out of render_scene
This fixes the broken dynamic lighting in fisheye rendering. It does mean that frustum culling of lit surfaces needed to be removed, but if not doing frustum culling on lit surfaces was good enough for a P90, it's probably good enough for an i7-6850K.
This commit is contained in:
parent
73e5ccd0d5
commit
2383c12a4a
2 changed files with 2 additions and 5 deletions
|
@ -300,8 +300,6 @@ R_MarkLights (vec4f_t lightorigin, dlight_t *light, int lightnum,
|
|||
|| leaf->mins[1] > maxs[1] || leaf->maxs[1] < mins[1]
|
||||
|| leaf->mins[2] > maxs[2] || leaf->maxs[2] < mins[2])
|
||||
continue;
|
||||
if (R_CullBox (r_refdef.frustum, leaf->mins, leaf->maxs))
|
||||
continue;
|
||||
msurface_t **msurf = brush->marksurfaces + leaf->firstmarksurface;
|
||||
for (m = 0; m < leaf->nummarksurfaces; m++) {
|
||||
msurface_t *surf = *msurf++;
|
||||
|
@ -321,8 +319,7 @@ R_PushDlights (const vec3_t entorigin)
|
|||
unsigned int i;
|
||||
dlight_t *l;
|
||||
|
||||
// because the count hasn't advanced yet for this frame
|
||||
r_dlightframecount = r_framecount + 1;
|
||||
r_dlightframecount = r_framecount;
|
||||
|
||||
if (!r_dlight_lightmap)
|
||||
return;
|
||||
|
|
|
@ -183,7 +183,6 @@ SCR_CalcRefdef (void)
|
|||
static void
|
||||
render_scene (void)
|
||||
{
|
||||
r_framecount++;
|
||||
EntQueue_Clear (r_ent_queue);
|
||||
r_funcs->render_view ();
|
||||
r_funcs->draw_particles (&r_psystem);
|
||||
|
@ -280,6 +279,7 @@ SCR_UpdateScreen (transform_t camera, double realtime, SCR_Func *scr_funcs)
|
|||
R_MarkLeaves (scr_scene->viewleaf, r_node_visframes, r_leaf_visframes,
|
||||
r_face_visframes);
|
||||
}
|
||||
r_framecount++;
|
||||
R_PushDlights (vec3_origin);
|
||||
|
||||
r_funcs->begin_frame ();
|
||||
|
|
Loading…
Reference in a new issue