- Fix for adding rendering passes. It seems the result was multiplied

by alpha twice, which gave dark edges on an grass AO pass for example.
This commit is contained in:
Brecht Van Lommel 2008-01-28 22:43:16 +00:00
parent db9f702db9
commit c68f48d964

@ -3590,10 +3590,10 @@ void add_transp_passes(RenderLayer *rl, int offset, ShadeResult *shr, float alph
if(col) {
fp= rpass->rect + pixsize*offset;
fp[0]= alpha*col[0] + (1.0f-alpha)*fp[0];
fp[0]= col[0] + (1.0f-alpha)*fp[0];
if(pixsize==3) {
fp[1]= alpha*col[1] + (1.0f-alpha)*fp[1];
fp[2]= alpha*col[2] + (1.0f-alpha)*fp[2];
fp[1]= col[1] + (1.0f-alpha)*fp[1];
fp[2]= col[2] + (1.0f-alpha)*fp[2];
}
}
}