         src = blinnPhong<t_bpc>(src, pos, texCoord, Lpos, V, Ka, Kd, Ks, shininess, constAtt, linearAtt, quadAtt, &sphereNormal);
         justClippedSphere = false;
       }
+      else if(justClippedBox)
+      {
+        src = blinnPhong<t_bpc>(src, pos, texCoord, Lpos, V, Ka, Kd, Ks, shininess, constAtt, linearAtt, quadAtt, &boxNormal);
+      }
       else
       {
         src = blinnPhong<t_bpc>(src, pos, texCoord, Lpos, V, Ka, Kd, Ks, shininess, constAtt, linearAtt, quadAtt);
       }
+      justClippedBox = false; // just clipped bounding box passed after any case
     }
     justClippedPlane = false;
     justClippedSphere = false;

}

__device__ bool intersectBox(const Ray& ray, const float3& boxmin, const float3& boxmax,
                             float* tnear, float* tfar)
{
  // compute intersection of ray with all six bbox planes
  float3 invR = make_float3(1.0f, 1.0f, 1.0f) / ray.d;

    }
    return;
  }
  bool justClippedBox = true;

  if (fmodf(tbnear, dist) != 0.0f)
  {
