 {
     eavlExecutor::AddOperation(new_eavlMapOp(eavlOpArgs(rayDirX,rayDirY,rayDirZ,rayOriginX,rayOriginY,rayOriginZ,hitIdx, primitiveTypeHit),
                                              eavlOpArgs(interX, interY,interZ,rayDirX,rayDirY,rayDirZ,normX,normY,normZ,alphas,betas,scalars),
-                                             ReflectTriFunctor(vertsTex,norms)),
+                                             ReflectTriFunctor(tri_verts_array,norms)),
                                              "reflect");
     eavlExecutor::Go();     
 }


};

eavlConstArrayV2<float4>* bvhTex;
eavlConstArrayV2<float4>* vertsTex;
eavlConstArrayV2<float>*  bvhLeafsTex;
eavlConstArrayV2<float4>* colorMapTex;

void writeBVHCache(const float *innerNodes, const int innerSize, const float * leafNodes, const int leafSize, const char* filename )
{


            for(int i=1;i<numSheres;i++)
            {        
                int sphereIndex=(int)bvhLeafs.getValue(tri_bvh_lf_tref,currentNode+i);
                
                float4 data=verts.getValue(sphr_verts_tref, sphereIndex);
                float c = cc  +data.w*data.w;               /* radius squared */
                float d = b*b - 4.f*a*c;                    /* descriminant */ 

