diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-01 02:27:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-01 02:27:40 +0300 |
commit | da41eb178bf90ba1e48644cd3540ca3a90783d5f (patch) | |
tree | 24e837b0f9f1387c6aae7408a13a60d553c51286 /source/blender/render | |
parent | ea70bcb5b88e3ef14d268b6b11929fab185773f2 (diff) |
Fix #20830: only rendering Z pass did not give correct Z values.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/shadeinput.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/zbuf.c | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index 38241878300..d1fa8a5ed51 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -1416,6 +1416,10 @@ int shade_samples(ShadeSample *ssamp, PixStr *ps, int x, int y) shade_input_do_shade(shi, shr); } } + else if(shi->passflag & SCE_PASS_Z) { + for(samp=0; samp<ssamp->tot; samp++, shi++, shr++) + shr->z= -shi->co[2]; + } return 1; } diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index 484dbdd37a3..6d67c068bdd 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -3828,6 +3828,11 @@ static int shade_tra_samples(ShadeSample *ssamp, StrandShadeCache *cache, int x, renderspothalo(shi, shr->combined, shr->combined[3]); } } + else if(shi->passflag & SCE_PASS_Z) { + for(samp=0; samp<ssamp->tot; samp++, shi++, shr++) + shr->z= -shi->co[2]; + } + return 1; } return 0; |