Sounds good fallahn, but my experience with shader is nearly zero.
i tried to implement your snippet with (tried vertex and fragment)
sf::Shader shader;
// load only the vertex shader
if (!shader.loadFromFile("shader.vert", sf::Shader::Vertex))
{
std::cout << "errorshadder";
}
shader.setParameter("texture", sf::Shader::CurrentTexture);
and
/* MINIMAP */
sf::View testview(sf::FloatRect(0, 0, 120, 120));
testview.setViewport((sf::FloatRect(0.75, 0.1, 0.2, 0.2)));
testview.zoom(10);
testview.setCenter(MainPlayer.GetPlayerSprite().getPosition().x+16,MainPlayer.GetPlayerSprite().getPosition().y+16);
window.setView(testview);
window.draw(MainChunk->GetBgSprite(),&shader);
if(MainPlayer.GetPlayerDirection() == 1)
{
window.draw(MainChunk->GetMainSprite(),&shader);
window.draw(MainPlayer.GetPlayerSprite(),&shader);
}
else
{
window.draw(MainPlayer.GetPlayerSprite(),&shader);
window.draw(MainChunk->GetMainSprite(),&shader);
}
window.draw(circle);
window.draw(MainChunk->GetCollisionSprite(),&shader);
but i get a mass of compiling errors, i tried a few things and tried to set it up like in the tutorial but failed kinda hard x.X