diff options
author | Ton Roosendaal <ton@blender.org> | 2011-02-22 20:19:02 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-02-22 20:19:02 +0300 |
commit | ca930c32083edbbbc732d8eddd9b5997e5b0bbb0 (patch) | |
tree | 0b5913e91a319af99d1087e8ffcdb0c78ef3aac5 /source | |
parent | 354fc0076e4f4bb6bc95e9d3ed260dd38d7910dc (diff) |
Bugfix #25967
Node Materials: option "Front/Back" in geometry node failed for
"full osa" case in ZTransp.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/include/shading.h | 1 | ||||
-rw-r--r-- | source/blender/render/intern/source/shadeinput.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/zbuf.c | 5 |
3 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h index 8250c5631dd..2d3045fcd64 100644 --- a/source/blender/render/intern/include/shading.h +++ b/source/blender/render/intern/include/shading.h @@ -62,6 +62,7 @@ void shade_input_calc_viewco(struct ShadeInput *shi, float x, float y, float z, void shade_input_set_viewco(struct ShadeInput *shi, float x, float y, float sx, float sy, float z); void shade_input_set_uv(struct ShadeInput *shi); void shade_input_set_normals(struct ShadeInput *shi); +void shade_input_set_vertex_normals(struct ShadeInput *shi); void shade_input_flip_normals(struct ShadeInput *shi); void shade_input_set_shade_texco(struct ShadeInput *shi); void shade_input_set_strand(struct ShadeInput *shi, struct StrandRen *strand, struct StrandPoint *spoint); diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index 81b2203cbcf..f32b1046228 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -841,7 +841,7 @@ void shade_input_set_normals(ShadeInput *shi) } /* XXX shi->flippednor messes up otherwise */ -static void shade_input_set_vertex_normals(ShadeInput *shi) +void shade_input_set_vertex_normals(ShadeInput *shi) { float u= shi->u, v= shi->v; float l= 1.0f+u+v; diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index a3d3a65cccc..f6ccb025fe7 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -3766,7 +3766,10 @@ static void shade_tra_samples_fill(ShadeSample *ssamp, int x, int y, int z, int shi->samplenr= R.shadowsamplenr[shi->thread]++; shade_input_set_viewco(shi, x, y, xs, ys, (float)z); shade_input_set_uv(shi); - shade_input_set_normals(shi); + if(shi_inc==0) + shade_input_set_normals(shi); + else /* XXX shi->flippednor messes up otherwise */ + shade_input_set_vertex_normals(shi); shi_inc= 1; } |