diff options
author | Ton Roosendaal <ton@blender.org> | 2006-07-03 15:53:52 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-07-03 15:53:52 +0400 |
commit | cc85c0951e31c1b19b4676a06eeca24236ddbb68 (patch) | |
tree | d50bb29152f13acefd892edce8d421fea73b42cd /source | |
parent | 780b8d83c5587caa6c6d73da4411e55cf69757d0 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 5 | ||||
-rw-r--r-- | source/blender/render/intern/source/renderdatabase.c | 18 |
2 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 2adf589392b..ca24484f7a8 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -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; } } diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 500fce88957..8f182299de3 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -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; |