void eDeferredRenderer::_visualizeGeometryBuffer(const eRect &area) const
{
    eStateManager::push();
    eStateManager::bindVertexShader(m_vsQuad);
    eStateManager::bindPixelShader(m_psQuad);
    eStateManager::setCullingMode(eCULLING_NONE);
    eStateManager::setTextureAddressMode(0, eTEXADDRMODE_CLAMP);
    eStateManager::setCap(eCAP_ZBUFFER, eFALSE);
    eStateManager::setCap(eCAP_BLENDING, eFALSE);

    const eInt w = area.getWidth();
    const eInt h = area.getHeight();

    // Image at top left.
    eStateManager::bindTexture(0, m_specularRt);
   // renderQuad(eRect(0, h/2, w/2, h-1), area.getDimension());

    // Image at top right.
    eStateManager::bindTexture(0, m_diffuseRt);
    renderQuad(eRect(w/2, h/2, w-1, h-1), area.getDimension());

    // Image at bottom left.
    eStateManager::bindTexture(0, m_normalsRt);
    renderQuad(eRect(0, 0, w/2, h/2), area.getDimension());

    // Image at bottom right.
    eStateManager::bindTexture(0, m_positionRt);
    renderQuad(eRect(w/2, 0, w-1, h/2), area.getDimension());

    eStateManager::pop();
}
void eDeferredRenderer::_showGeometryBuffer(eTexture2d *target, const eRect &area) const
{
    const eInt w = area.getWidth();
    const eInt h = area.getHeight();

    eGfx->freshRenderState().targets[0] = target;

    renderQuad(eRect(  0, h/3, w/2,     h), area.getSize(), m_rtShadow);    // top left
    renderQuad(eRect(w/2, h/3,   w,     h), area.getSize(), m_texDistMap);  // top right
    renderQuad(eRect(  0, h/3, w/2, 2*h/3), area.getSize(), m_rtSpecular);  // middle left
    renderQuad(eRect(w/2, h/3,   w, 2*h/3), area.getSize(), m_rtDiffuse);   // middle right
    renderQuad(eRect(  0,   0, w/2,   h/3), area.getSize(), m_rtNormals);   // bottom left
    renderQuad(eRect(w/2,   0,   w,   h/3), area.getSize(), m_rtPosition);  // bottom right
}