Small tweak to temporalscene cache to adhere to r_novis. Change sort order of water shaders when refract_fbo isn't active, to ensure the refraction scene is actually drawn before its read.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5853 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d5fa80a0d4
commit
cdbf3614a3
2 changed files with 13 additions and 2 deletions
|
@ -3312,7 +3312,14 @@ void R_GenWorldEBO(void *ctx, void *data, size_t a, size_t b)
|
|||
}
|
||||
|
||||
//maybe we should just use fatpvs instead, and wait for completion when outside?
|
||||
if (es->cluster[1] != -1 && es->cluster[0] != es->cluster[1])
|
||||
if (r_novis.ival)
|
||||
{
|
||||
if (es->pvs.buffersize < es->wmodel->pvsbytes)
|
||||
es->pvs.buffer = BZ_Realloc(es->pvs.buffer, es->pvs.buffersize=es->wmodel->pvsbytes);
|
||||
memset(es->pvs.buffer, 0xff, es->pvs.buffersize);
|
||||
pvs = es->pvs.buffer;
|
||||
}
|
||||
else if (es->cluster[1] != -1 && es->cluster[0] != es->cluster[1])
|
||||
{ //view is near to a water boundary. this implies the water crosses the near clip plane. we need both leafs.
|
||||
pvs = es->wmodel->funcs.ClusterPVS(es->wmodel, es->cluster[0], &es->pvs, PVM_REPLACE);
|
||||
pvs = es->wmodel->funcs.ClusterPVS(es->wmodel, es->cluster[1], &es->pvs, PVM_MERGE);
|
||||
|
|
|
@ -5550,6 +5550,10 @@ done:;
|
|||
|
||||
if (!s->sort)
|
||||
{
|
||||
extern cvar_t r_refract_fbo;
|
||||
if ((s->flags & SHADER_HASREFRACT) && !r_refract_fbo.ival)
|
||||
s->sort = SHADER_SORT_UNDERWATER;
|
||||
else
|
||||
s->sort = SHADER_SORT_OPAQUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue