Fixed error in having Ztransp rendered in back of normal solid faces. Was
authorTon Roosendaal <ton@blender.org>
Wed, 2 Feb 2005 17:26:24 +0000 (17:26 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 2 Feb 2005 17:26:24 +0000 (17:26 +0000)
caused by changing definition of OSA pixel structs 3 weeks ago.
(result: AA looked bad).

Thanks phase for pointing at this.

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

index a98feaf0c3d10e250726edaa494cf1489462d80b..22859fcb5c5a53c4c04223e6ff5016307bc13482 100644 (file)
@@ -2607,16 +2607,6 @@ void zbufshadeDA(void)   /* Delta Accum Pixel Struct */
                if(RE_local_test_break()) break; 
        }
        
-       if(R.flag & (R_ZTRA+R_HALO) ) {  /* to get back correct values of zbuffer Z for transp and halos */
-               xd= jit[0][0];
-               yd= jit[0][1];
-               Zjitx= -xd -0.5;
-               Zjity= -yd -0.5;
-               RE_setwindowclip(0, -1);
-               if((R.r.mode & R_MBLUR)==0) RE_local_printrenderinfo(0.0, v);
-               zbufferall();
-       }
-
        rd= R.rectdaps;
        rz= R.rectz;
        rt= R.rectot;
index 528cffe876ab4d80f11d37ccf76043dbbfb70326..1049428b22808f1c677d3b5e7766d545dbc0c863 100644 (file)
@@ -2129,9 +2129,13 @@ static void copyto_abufz(int sample)
        int x, y, *rza;
        long *rd;
        
-       memcpy(Arectz, R.rectz+ R.rectx*Aminy, 4*R.rectx*(Amaxy-Aminy+1));
-
-       if( (R.r.mode & R_OSA)==0 || sample==0) return;
+       /* now, in OSA the pixstructs contain all faces filled in */
+       if(R.r.mode & R_OSA) fillrect(Arectz, R.rectx, Amaxy-Aminy+1, 0x7FFFFFFF);
+       else {
+               memcpy(Arectz, R.rectz+ R.rectx*Aminy, 4*R.rectx*(Amaxy-Aminy+1));
+               return;
+       }
+       //if( (R.r.mode & R_OSA)==0 || sample==0) return;
                
        rza= Arectz;
        rd= (R.rectdaps+ R.rectx*Aminy);
@@ -2146,6 +2150,7 @@ static void copyto_abufz(int sample)
 
                                while(ps) {
                                        if(sample & ps->mask) {
+                                               //printf("filled xy %d %d mask %d\n", x, y, sample);
                                                *rza= ps->z;
                                                break;
                                        }
index 3ac192f1cdc9bd720e5704cdf3b4a5b503e87adf..2885112b5b963907e34bd3a8ce3476d7a9be6ee3 100644 (file)
@@ -2904,7 +2904,7 @@ static void material_panel_shading(Material *ma)
                uiDefButI(block, TOG|BIT|22, 0, "Bias",                         245,80,65,19, &(ma->mode), 0, 0, 0, 0, "Prevents ray traced shadow errors with phong interpolated normals (terminator problem)");
                uiBlockEndAlign(block);
 
-               uiDefButI(block, TOG|BIT|16, 0, "Radio",                        245,55,65,19, &(ma->mode), 0, 0, 0, 0, "Enables material for radiosty rendering");
+               uiDefButI(block, TOG|BIT|16, 0, "Radio",                        245,55,65,19, &(ma->mode), 0, 0, 0, 0, "Enables material for radiosity rendering");
 
        }