I want to apply a fragment shader to the screen, so I can manipulate the frame buffer.
At the moment I am doing it like this:
if (m_frameBufferStates.shader != nullptr)
{
m_frameBufferTexture.update(*m_window);
m_frameBufferSprite.setTexture(m_frameBufferTexture);
m_window->draw(m_frameBufferSprite, m_frameBufferStates);
}
I noticed that this cost me a substantial chunk of performance. (because of sf::Texture update function)
I still have more than enough FPS but I was wondering if there is a better way to do this?