          bool t_lighting,
          bool t_opacityCorrection,
          bool t_clipping,
-         bool t_useIbr,
-         int t_ibrMode
+         bool t_useIbr
         >
 __global__ void render(uchar4* d_output, const uint width, const uint height,
                        const float4 backgroundColor,

                 false, // Local illumination.
                 t_opacityCorrection, // Opacity correction.
                 false, // Clipping.
                 true, // image based rendering,
                 vvRenderState::VV_MAX_GRADIENT
                >;
}
#else

template<
        int t_bpc,
        bool t_illumination,
        bool t_opacityCorrection,
        bool t_earlyRayTermination,
        bool t_clipping,
        int t_mipMode,
        bool t_useIbr,
        vvRayRend::IbrMode t_ibrMode
       >
renderKernel getKernelWithIbrMode(vvRayRend*)
{
  return &render<t_earlyRayTermination, // Early ray termination.
                 t_bpc, // Bytes per channel.
                 t_mipMode, // Mip mode.
                 t_illumination, // Local illumination.
                 t_opacityCorrection, // Opacity correction.
                 t_clipping,
                 t_useIbr, // image based rendering
                 t_ibrMode
                >;
}

template<
         int t_bpc,

         int t_mipMode,
         bool t_useIbr
        >
renderKernel getKernelWithIbr(vvRayRend*)
{
  return &render<t_earlyRayTermination, // Early ray termination.
                 t_bpc, // Bytes per channel.
                 t_mipMode, // Mip mode.
                 t_illumination, // Local illumination.
                 t_opacityCorrection, // Opacity correction.
                 t_clipping,
                 t_useIbr // image based rendering
                >;
}

template<
