I'm just new to writing ffgl's but i'm somewhat familiar with writing shaders.
I've have compiled the latest ffgl repository from: https://github.com/resolume/ffgl on my macbook pro using xcode.
Right now i'm trying to write a basic shader but i got stuck.
This piece of code doesn't work.
Code: Select all
static const char _fragmentShaderCode[] = R"(#version 410 core
uniform sampler2D InputTexture;
uniform vec3 Brightness;
in vec2 uv;
out vec4 fragColor;
void main()
{
fragColor = vec4(gl_FragCoord.xy/resolution,0.,1.);
}
)";
Code: Select all
fragColor = vec4(gl_FragCoord.xy/vec2(1920.,1080.),0.,1.);
It states that the resolution is passed by the plugin class.
Or do i need to do something else to get the resolution?