2.5: Material buttons
[blender.git] / source / blender / render / intern / source / zbuf.c
index 4436f3aa047e366f8bcafcdbf27a952ad46810d5..53a05dd0d671642bda6c96145e0e97d8c07024e9 100644 (file)
@@ -2152,7 +2152,7 @@ void zbuffer_solid(RenderPart *pa, RenderLayer *rl, void(*fillfunc)(RenderPart*,
                                if(obi->lay & lay) {
                                        if(vlr->mat!=ma) {
                                                ma= vlr->mat;
-                                               nofill= ma->mode & (MA_ZTRA|MA_ONLYCAST);
+                                               nofill= (ma->mode & MA_ONLYCAST) || ((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP));
                                                env= (ma->mode & MA_ENV);
                                                wire= (ma->material_type == MA_TYPE_WIRE);
                                                
@@ -3306,7 +3306,7 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, Re
                        
                        if(vlr->mat!=ma) {
                                ma= vlr->mat;
-                               dofill= (ma->mode & MA_ZTRA) && !(ma->mode & MA_ONLYCAST);
+                               dofill= ((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP)) && !(ma->mode & MA_ONLYCAST);
                        }
                        
                        if(dofill) {
@@ -3480,7 +3480,7 @@ void merge_transp_passes(RenderLayer *rl, ShadeResult *shr)
                                col= shr->refl;
                                break;
                        case SCE_PASS_RADIO:
-                               col= shr->rad;
+                               col= NULL; // removed shr->rad;
                                break;
                        case SCE_PASS_REFRACT:
                                col= shr->refr;
@@ -3582,7 +3582,7 @@ void add_transp_passes(RenderLayer *rl, int offset, ShadeResult *shr, float alph
                                col= shr->refr;
                                break;
                        case SCE_PASS_RADIO:
-                               col= shr->rad;
+                               col= NULL; // removed shr->rad;
                                break;
                        case SCE_PASS_NORMAL:
                                col= shr->nor;
@@ -3817,8 +3817,8 @@ static int addtosamp_shr(ShadeResult *samp_shr, ShadeSample *ssamp, int addpassf
                                        if(addpassflag & SCE_PASS_REFRACT)
                                                addvecmul(samp_shr->refr, shr->refr, fac);
                                        
-                                       if(addpassflag & SCE_PASS_RADIO)
-                                               addvecmul(samp_shr->rad, shr->rad, fac);
+                                       /* removed if(addpassflag & SCE_PASS_RADIO)
+                                               addvecmul(samp_shr->rad, shr->rad, fac);*/
                                        
                                        if(addpassflag & SCE_PASS_MIST)
                                                samp_shr->mist= samp_shr->mist+fac*shr->mist;