IRC report fix:

- Halos were not sorted, for ages! Meaning that they were rendered in order
  of creation, instead of back to front.
- Made ESC testing for halo render to check per halo, is a fast routine now
  anyway.
This commit is contained in:
2006-07-03 11:53:52 +00:00
parent 780b8d83c5
commit cc85c0951e
2 changed files with 11 additions and 12 deletions

View File

@@ -498,10 +498,8 @@ static void halo_tile(RenderPart *pa, float *pass, unsigned int lay)
}
for(a=0; a<R.tothalo; a++) {
if((a & 255)==0) {
if(R.test_break() ) break;
if((a & 255)==0)
har= R.bloha[a>>8];
}
else har++;
/* layer test, clip halo with y */
@@ -555,6 +553,7 @@ static void halo_tile(RenderPart *pa, float *pass, unsigned int lay)
}
}
}
if(R.test_break() ) break;
}
}

View File

@@ -391,20 +391,20 @@ HaloRen *RE_inithalo(Render *re, Material *ma, float *vec, float *vec1,
VECCOPY(har->co, vec);
har->hasize= hasize;
/* actual projectvert is done in function transform_renderdata() because of parts/border/pano */
/* actual projectvert is done in function project_renderdata() because of parts/border/pano */
/* we do it here for sorting of halos */
zn= hoco[3];
har->xs= 0.5*re->winx*(hoco[0]/zn);
har->ys= 0.5*re->winy*(hoco[1]/zn);
har->zs= 0x7FFFFF*(hoco[2]/zn);
har->zBufDist = 0x7FFFFFFF*(hoco[2]/zn);
/* halovect */
if(vec1) {
har->type |= HA_VECT;
zn= hoco[3];
har->xs= 0.5*re->winx*(hoco[0]/zn);
har->ys= 0.5*re->winy*(hoco[1]/zn);
har->zs= 0x7FFFFF*(hoco[2]/zn);
har->zBufDist = 0x7FFFFFFF*(hoco[2]/zn);
xn= har->xs - 0.5*re->winx*(hoco1[0]/hoco1[3]);
yn= har->ys - 0.5*re->winy*(hoco1[1]/hoco1[3]);
if(xn==0.0 || (xn==0.0 && yn==0.0)) zn= 0.0;