Unified render added sky with alpha=1. Found the way how to fix it, didnt
dare that yesterday. :)
Now sky is rendered with alpha=0, like normal render.

Thanks to the recent reports, a lot of old issues with unified render have
been solved. This is going to be pretty OK!
This commit is contained in:
Ton Roosendaal
2004-12-03 17:03:35 +00:00
parent 7a686d2d7e
commit 0d9f06cce4
2 changed files with 1 additions and 21 deletions

View File

@@ -399,21 +399,6 @@ void addalphaAddfacFloat(float *dest, float *source, char addfac)
float m; /* weiging factor of destination */
float c; /* intermediate colour */
/* 1. copy source straight away if dest has zero alpha */
/* 2. copy dest straight away if dest has full alpha */
/* I am not sure whether (2) is correct. It seems to */
/* me that this should not happen if float colours */
/* aren't clipped at 1.0 . */
/* I'll keep the code, but disabled.... */
if ( (dest[3] < RE_EMPTY_COLOUR_FLOAT)
/* || source[3] > RE_FULL_COLOUR_FLOAT */ ) {
dest[0] = source[0];
dest[1] = source[1];
dest[2] = source[2];
dest[3] = source[3];
return;
}
/* Addfac is a number between 0 and 1: rescale */
/* final target is to diminish the influence of dest when addfac rises */
m = 1.0 - ( source[3] * ((255.0 - addfac) / 255.0));
@@ -884,12 +869,6 @@ void addalphaAddfacshort(unsigned short *doel,
{
int c, mul;
if( doel[3]==0) {
*((unsigned int *)doel)= *((unsigned int *)bron);
*((unsigned int *)(doel+2))= *((unsigned int *)(bron+2));
return;
}
mul= 0xFFFF - (bron[0]*(255-addfac))/255;
c= ((mul*doel[0])>>16)+bron[0];

View File

@@ -418,6 +418,7 @@ void renderSkyPixelFloat(float x, float y)
case RE_ALPHA_SKY:
/* Fill in the sky as if it were a normal face. */
shadeSkyPixel(x, y);
collector[3]= 0.0;
break;
default:
; /* Error: illegal alpha blending state */