Hi,
I'm trying to implement a simple function in my GLSL shader program, but am met with errors. The version of SFML I am using is 1.6, with Code::Blocks 10.05 for Windows (MinGW).
Here's the offending code:
// shader.sfx
texture Img1
float foo(in float fubar)
{
return(fubar);
}
effect
{
_out = Img1(_in);
}
and here are the errors:
Post-effect error : invalid declaration (should be "[type][name]")
> {
Failed to compile post-effect :
(0) : error C0000: syntax error, unexpected $end at token "<EOF>"
(0) : error C0501: type name expected at token "<null atom>"
I suspect SFML isn't properly parsing the shader source. One reason for my belief is that it won't accept the ';' terminator at the end of variable declarations. Another is how this will work:
effect
{
_out = Img1(_in);
}
but this will not:
effect {
_out = Img1(_in);
}
I've tried not adding ';' at the end of the return line, and also removing 'in,' among other things.
Should I be using SFML 2.0?
thx,
~Strobe