Node Materials: option "Front/Back" in geometry node failed for
"full osa" case in ZTransp.
This commit is contained in:
2011-02-22 17:19:02 +00:00
parent 354fc0076e
commit ca930c3208
3 changed files with 6 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;
}