Bug fix #1880
authorTon Roosendaal <ton@blender.org>
Wed, 24 Nov 2004 18:53:45 +0000 (18:53 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 24 Nov 2004 18:53:45 +0000 (18:53 +0000)
Two accumulating errors, causing 'scanline' errors too, but now based on
using different filtering values for transparent shadows.
Was another 2 cases of unused variable render as well. :)

source/blender/blenkernel/intern/material.c
source/blender/render/intern/source/ray.c

index a8219d560cf74dae04abafc7ddd31e8aecb29bd9..456717f52b20c55b8b573cf4a75aca03c83fe1ce 100644 (file)
@@ -585,7 +585,7 @@ void init_render_material(Material *ma)
        if(needuv) ma->texco |= NEED_UV;
 
        // since the raytracer doesnt recalc O structs for each ray, we have to preset them all
-       if(ma->mode & (MA_RAYMIRROR|MA_RAYTRANSP)) { 
+       if(ma->mode & (MA_RAYMIRROR|MA_RAYTRANSP|MA_SHADOW_TRA)) { 
                ma->texco |= NEED_UV|TEXCO_ORCO|TEXCO_REFL|TEXCO_NORM;
                if(R.osa) ma->texco |= TEXCO_OSA;
        }
index 96a95c74f702d39e0901a80b5901a89adfeda3a8..d476bc6b2ea4dcc3fc0b065d9d14f281b6716e19 100644 (file)
@@ -1484,8 +1484,10 @@ static void traceray(short depth, float *start, float *vec, float *col, VlakRen
        isec.vlrorig= vlr;
 
        if( d3dda(&isec) ) {
+               
                shi.mask= mask;
                shi.osatex= osatex;
+               
                shade_ray(&isec, &shi, &shr);
                
                if(depth>0) {
@@ -1756,6 +1758,9 @@ static void ray_trace_shadow_tra(Isect *is, int depth)
                float col[4];
                /* we got a face */
                
+               shi.mask= 1;
+               shi.osatex= 0;
+               
                shade_ray(is, &shi, &shr);
                
                /* add color */