Hi!
I want to use
this shader but all i get is a black image. I know the texture is loaded correctly because i can render it without the shader.
This is how i load and use the shader, which is probably not correct.
void init() {
shader.loadFromFile("glsl-shaders-master/xbr/shaders/xbr-mlv4-multipass/xbr-mlv4-pass1.glsl", sf::Shader::Vertex);
shader.loadFromFile("glsl-shaders-master/xbr/shaders/xbr-mlv4-multipass/xbr-mlv4-pass1.glsl", sf::Shader::Fragment);
shader.setUniform("MVPmatrix", sf::Glsl::Mat4(bg_sprite.getTransform()));
shader.setUniform("FrameDirection", 1);
shader.setUniform("FrameCount", 100);
shader.setUniform("OutputSize", sf::Vector2f(500, 500));
shader.setUniform("TextureSize", sf::Vector2f(500, 500));
shader.setUniform("InputSize", sf::Vector2f(500, 500));
shader.setUniform("Texture", sf::Shader::CurrentTexture);
//more code
}
void draw() {
window.draw(bg_sprite, &shader);
//more code
}
This are the errors i get:
Uniform "MVPmatrix" not found in shader
Uniform "FrameDirection" not found in shader
Uniform "FrameCount" not found in shader
Uniform "OutputSize" not found in shader
Uniform "TextureSize" not found in shader
Uniform "InputSize" not found in shader
Uniform "Texture" not found in shader