Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-02-10 01:56:08 +0300
committerTon Roosendaal <ton@blender.org>2006-02-10 01:56:08 +0300
commit56378eedff26e111a53a966fb988021ce0624821 (patch)
treea0e767ad3896c03cbcc4f2df8496e0415a603f8d /source
parentb22c84633057a86e57a6a9478f787d10214df9d9 (diff)
Addition to previous commit: disabling RenderLayer "Halo" did not skip
lamphalo rendering yet... silly me!
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/include/rendercore.h2
-rw-r--r--source/blender/render/intern/source/rendercore.c33
-rw-r--r--source/blender/render/intern/source/zbuf.c1
3 files changed, 21 insertions, 15 deletions
diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h
index 4c28959ceba..79b892564bf 100644
--- a/source/blender/render/intern/include/rendercore.h
+++ b/source/blender/render/intern/include/rendercore.h
@@ -52,7 +52,7 @@ struct ShadeResult;
/* to make passing on variables to shadepixel() easier */
typedef struct ShadePixelInfo {
int thread;
- int passflag;
+ int layflag, passflag;
unsigned int lay;
ShadeResult shr;
} ShadePixelInfo;
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 11b15aa4491..65447aca4b4 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -2628,23 +2628,26 @@ void *shadepixel(ShadePixelInfo *shpi, float x, float y, int z, volatile int fac
}
if(R.flag & R_LAMPHALO) {
- if(facenr<=0) { /* calc view vector and put shi.co at far */
- if(R.r.mode & R_ORTHO) {
- /* x and y 3d coordinate can be derived from pixel coord and winmat */
- float fx= 2.0/(R.rectx*R.winmat[0][0]);
- float fy= 2.0/(R.recty*R.winmat[1][1]);
+ if(shpi->layflag & SCE_LAY_HALO) {
+
+ if(facenr<=0) { /* calc view vector and put shi.co at far */
+ if(R.r.mode & R_ORTHO) {
+ /* x and y 3d coordinate can be derived from pixel coord and winmat */
+ float fx= 2.0/(R.rectx*R.winmat[0][0]);
+ float fy= 2.0/(R.recty*R.winmat[1][1]);
+
+ shi.co[0]= (0.5 + x - 0.5*R.rectx)*fx - R.winmat[3][0]/R.winmat[0][0];
+ shi.co[1]= (0.5 + y - 0.5*R.recty)*fy - R.winmat[3][1]/R.winmat[1][1];
+ }
+
+ calc_view_vector(shi.view, x, y);
+ shi.co[2]= 0.0;
- shi.co[0]= (0.5 + x - 0.5*R.rectx)*fx - R.winmat[3][0]/R.winmat[0][0];
- shi.co[1]= (0.5 + y - 0.5*R.recty)*fy - R.winmat[3][1]/R.winmat[1][1];
+ renderspothalo(&shi, shr->combined, 1.0);
}
-
- calc_view_vector(shi.view, x, y);
- shi.co[2]= 0.0;
-
- renderspothalo(&shi, shr->combined, 1.0);
+ else
+ renderspothalo(&shi, shr->combined, shr->combined[3]);
}
- else
- renderspothalo(&shi, shr->combined, shr->combined[3]);
}
return vlr;
@@ -2887,6 +2890,7 @@ static void shadeDA_tile(RenderPart *pa, RenderLayer *rl)
/* fill shadepixel info struct */
shpi.thread= pa->thread;
shpi.lay= rl->lay;
+ shpi.layflag= rl->layflag;
shpi.passflag= 0;
if(rl->passflag & ~(SCE_PASS_Z|SCE_PASS_NORMAL|SCE_PASS_VECTOR|SCE_PASS_COMBINED))
@@ -3197,6 +3201,7 @@ void zbufshade_tile(RenderPart *pa)
/* fill shadepixel info struct */
shpi.lay= rl->lay;
+ shpi.layflag= rl->layflag;
shpi.passflag= 0;
if(rl->passflag & ~(SCE_PASS_Z|SCE_PASS_NORMAL|SCE_PASS_VECTOR|SCE_PASS_COMBINED))
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 04807e3b2ba..b1e3a15bc95 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -2637,6 +2637,7 @@ void zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pass)
/* fill shadepixel info struct */
shpi.thread= pa->thread;
shpi.lay= rl->lay;
+ shpi.layflag= rl->layflag;
shpi.passflag= 0;
if(rl->passflag & ~(SCE_PASS_Z|SCE_PASS_NORMAL|SCE_PASS_VECTOR|SCE_PASS_COMBINED))