diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 6804ddc9719..47bd9ca5607 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -404,7 +404,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset, break; case SCE_PASS_UV: /* box filter only, gauss will screwup UV too much */ - if(shi->uv[0].uv[2]!=0.0f) { + if(shi->totuv) { float mult= (float)count_mask(curmask)/(float)R.osa; fp= rpass->rect + 3*offset; fp[0]+= mult*(0.5f + 0.5f*shi->uv[0].uv[0]); @@ -481,10 +481,12 @@ static void add_passes(RenderLayer *rl, int offset, ShadeInput *shi, ShadeResult col= shr->nor; break; case SCE_PASS_UV: - uvcol[0]= 0.5f + 0.5f*shi->uv[0].uv[0]; - uvcol[1]= 0.5f + 0.5f*shi->uv[0].uv[1]; - uvcol[2]= 1.0f; - col= uvcol; + if(shi->totuv) { + uvcol[0]= 0.5f + 0.5f*shi->uv[0].uv[0]; + uvcol[1]= 0.5f + 0.5f*shi->uv[0].uv[1]; + uvcol[2]= 1.0f; + col= uvcol; + } break; case SCE_PASS_VECTOR: col= shr->winspeed; diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index c1bc3108eb4..dcbf9a7bf72 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -691,7 +691,7 @@ void shade_input_set_shade_texco(ShadeInput *shi) suv->uv[0]= -1.0f + 2.0f*(l*uv3[0]-u*uv1[0]-v*uv2[0]); suv->uv[1]= -1.0f + 2.0f*(l*uv3[1]-u*uv1[1]-v*uv2[1]); - suv->uv[2]= 1.0f; /* texture.c assumes there are 3 coords, also to indicate it is real UV for passes */ + suv->uv[2]= 0.0f; /* texture.c assumes there are 3 coords */ if(shi->osatex) { float duv[2]; @@ -727,7 +727,7 @@ void shade_input_set_shade_texco(ShadeInput *shi) suv->uv[0]= 2.0f*(u+.5f); suv->uv[1]= 2.0f*(v+.5f); - suv->uv[2]= 0.0f; /* texture.c assumes there are 3 coords, also to indicate it is no real UV for passes */ + suv->uv[2]= 0.0f; /* texture.c assumes there are 3 coords */ if(mode & MA_FACETEXTURE) { /* no tface? set at 1.0f */