Bugfix: de-premul for image texture didn't happen for non-osa case.

This commit is contained in:
Ton Roosendaal
2007-12-04 19:06:00 +00:00
parent 12a6008d2f
commit 25ea528a29

View File

@@ -244,6 +244,14 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, TexResult *texre
if(tex->flag & TEX_NEGALPHA) texres->ta= 1.0f-texres->ta;
/* de-premul, this is being premulled in shade_input_do_shade() */
if(texres->ta!=1.0f && texres->ta!=0.0f) {
fx= 1.0f/texres->ta;
texres->tr*= fx;
texres->tg*= fx;
texres->tb*= fx;
}
return retval;
}