     eavlExecutor::Go();
 
 
-    //eavlExecutor::AddOperation(new_eavlMapOp(eavlOpArgs(rayDirX,rayDirY,rayDirZ,rayOriginX,rayOriginY,rayOriginZ,hitIdx,primitiveTypeHit,minDistances),
-    //                                         eavlOpArgs(hitIdx, minDistances, primitiveTypeHit),
-    //                                         RayIntersectFunctor(tri_verts_array,tri_bvh_in_array,tri_bvh_lf_array,TRIANGLE)),
-    //                                                                                                "intersect");
-    //eavlExecutor::Go();
+    eavlExecutor::AddOperation(new_eavlMapOp(eavlOpArgs(rayDirX,rayDirY,rayDirZ,rayOriginX,rayOriginY,rayOriginZ,hitIdx,primitiveTypeHit,minDistances),
+                                             eavlOpArgs(hitIdx, minDistances, primitiveTypeHit),
+                                             RayIntersectFunctor(tri_verts_array,tri_bvh_in_array,tri_bvh_lf_array,TRIANGLE)),
+                                                                                                    "intersect");
+    eavlExecutor::Go();
 
     eavlExecutor::AddOperation(new_eavlMapOp(eavlOpArgs(rayDirX,rayDirY,rayDirZ,rayOriginX,rayOriginY,rayOriginZ,hitIdx,primitiveTypeHit,minDistances),
                                              eavlOpArgs(hitIdx, minDistances, primitiveTypeHit),
                                              RayIntersectFunctor(sphr_verts_array,sphr_bvh_in_array,sphr_bvh_lf_array,SPHERE)),
                                                                                                     "intersect");
     eavlExecutor::Go();
-    for (int i=0 ; i<size; i++) cout<< hitIdx->GetValue(i)<<" ";
+    //for (int i=0 ; i<size; i++) cout<< hitIdx->GetValue(i)<<" ";
 
     eavlExecutor::AddOperation(new_eavlMapOp(eavlOpArgs(hitIdx),                /*On primary ray: hits some in as -2, and leave as -1 if it misses everything*/
                                              eavlOpArgs(hitIdx),                /*This allows dead rays to be filtered out on multiple bounces */

 distance=minDistance;
 return minIndex;
}



EAVL_HOSTDEVICE float getIntersectionDepth(const eavlVector3 rayDir, const eavlVector3 rayOrigin, bool occlusion, const eavlConstArrayV2<float4> &bvh,const eavlConstArrayV2<float> &tri_bvh_lf_raw,eavlConstArrayV2<float4> &verts,const float &maxDistance)
{


    for(int i=0; i< size; i++)
    {
        maxDepth= max(depthBuffer->GetValue(i), maxDepth);  
        minDepth= max(0.f,min(minDepth,depthBuffer->GetValue(i)));//??
    } 
    //for(int i=0; i< size; i++) cout<<depthBuffer->GetValue(i)<<" ";
    maxDepth=maxDepth-minDepth;
    for(int i=0; i< size; i++) depthBuffer->SetValue(i, (depthBuffer->GetValue(i)-minDepth)/maxDepth);
    
    eavlExecutor::AddOperation(new_eavlScatterOp(eavlOpArgs(depthBuffer),
                                                 eavlOpArgs(d),
