Bugfix: deep shadow buffer commit made mixed solid/ztransp rendering
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 15 Oct 2009 09:56:10 +0000 (09:56 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 15 Oct 2009 09:56:10 +0000 (09:56 +0000)
not work correct without OSA.

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

index a7b9867715f104295630aa262fca7909581b4cbe..6e305a2b82b05ccb41d85baff5e938e27f04fbff 100644 (file)
@@ -3181,15 +3181,19 @@ static void copyto_abufz(RenderPart *pa, int *arectz, int *rectmask, int sample)
        int x, y, *rza, *rma;
        intptr_t *rd;
        
-       if((R.osa==0 && !pa->rectz) || !pa->rectdaps) {
-               fillrect(arectz, pa->rectx, pa->recty, 0x7FFFFFFE);
-               return;
-       }
-
        if(R.osa==0) {
-               memcpy(arectz, pa->rectz, sizeof(int)*pa->rectx*pa->recty);
+               if(!pa->rectz)
+                       fillrect(arectz, pa->rectx, pa->recty, 0x7FFFFFFE);
+               else
+                       memcpy(arectz, pa->rectz, sizeof(int)*pa->rectx*pa->recty);
+
                if(rectmask && pa->rectmask)
                        memcpy(rectmask, pa->rectmask, sizeof(int)*pa->rectx*pa->recty);
+
+               return;
+       }
+       else if(!pa->rectdaps) {
+               fillrect(arectz, pa->rectx, pa->recty, 0x7FFFFFFE);
                return;
        }