Previous fix was in wrong part of code... not alpha adding was wrong, but
authorTon Roosendaal <ton@blender.org>
Sun, 29 Jan 2006 18:04:15 +0000 (18:04 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 29 Jan 2006 18:04:15 +0000 (18:04 +0000)
there was an error in the zbuffer code!

This should fix combinations of using Ztransp and Solid faces.

source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/zbuf.c

index 6304abe67ff80671605c1c62e276812820ab44bc..87c1330d5ef3cca62494562ece54744a52b3913c 100644 (file)
@@ -2569,7 +2569,7 @@ static void shadeDA_tile(RenderPart *pa, float *rectf, float *recta)
                                                        ys= (float)y + R.jit[samp][1];
                                                        shadepixel_sky(pa, xs, ys, zbuf, face, (1<<samp), fcol);
                                                        
-                                                       if(acol && acol[3]!=0.0) addAlphaUnderFloat(fcol, acol);
+                                                       if(acol && acol[3]!=0.0) addAlphaOverFloat(fcol, acol);
                                                        if(R.do_gamma) {
                                                                fcol[0]= gammaCorrect(fcol[0]);
                                                                fcol[1]= gammaCorrect(fcol[1]);
@@ -2585,7 +2585,7 @@ static void shadeDA_tile(RenderPart *pa, float *rectf, float *recta)
                                        ys= (float)y+R.samples->centLut[b>>4];
                                        shadepixel_sky(pa, xs, ys, zbuf, face, curmask, fcol);
                                        
-                                       if(acol && acol[3]!=0.0) addAlphaUnderFloat(fcol, acol);
+                                       if(acol && acol[3]!=0.0) addAlphaOverFloat(fcol, acol);
                                        
                                        if(R.do_gamma) {
                                                fcol[0]= gammaCorrect(fcol[0]);
index 1c2cdb2c616feb5aad34d29901238205875703a4..529fb5bd535359c604d4333462cc71c10f2b9fb5 100644 (file)
@@ -1871,7 +1871,7 @@ static void copyto_abufz(RenderPart *pa, int *arectz, int sample)
                memcpy(arectz, pa->rectz, 4*pa->rectx*pa->recty);
                return;
        }
-       if( (R.r.mode & R_OSA)==0 || sample==0) return;
+       //if( (R.r.mode & R_OSA)==0 || sample==0) return;
                
        rza= arectz;
        rd= pa->rectdaps;