SFML community forums
Help => Graphics => Topic started by: ANtY on September 12, 2011, 11:12:37 pm
-
I have some issues with postfx, it's running well on others' PCs but not on mine. There is a lot of stupid errors, not found variables, not found functions (like atan2) or "too many arguments in contructor" in line like this:
dist/=powe;
All this while the same code works on my friend's pc...
My graphics card is ATI Radeon HD 5670.
-
Can you show your complete shader code? Have you tried the "PostFx" sample from the SFML SDK?
-
I knew you'll say something like this
texture frame
vec2 center
float powe
effect
{
vec4 px=frame(_in);
float dist=distance(_in,center);
dist*=1000;
dist/=powe;
_out=vec4(px/(dist<1?sqrt(sqrt(dist)):dist),1);
}
But that's not what I asked, problem is that it's working on other PC's, but not on mine.
-
This is most likely a driver problem. That's why you should first test the official PostFx example, which is known to work.
-
It works
-
Ok, so it's your shader which contains instructions that are not supported by your driver.
Can you show us the list of errors that you get?
-
too many arguments contructor - for / operator,
Texture: not found "framebuffer" in post-effect - even when I use it in shader
Parameter: not found "radius" in post-effect - same
error(#202) No matching overloaded function found atan2
etc.
-
too many arguments contructor - for / operator,
Texture: not found "framebuffer" in post-effect - even when I use it in shader
Parameter: not found "radius" in post-effect - same
error(#202) No matching overloaded function found atan2
Is there anything which relates to the shader that you posted? I see no "framebuffer" or "radius" variables, and no call to atan2.
And don't you have the corresponding lines of code?
-
In this which I posted only this shows:
error(#202) No matching overloaded function found atan2
-
error(#202) No matching overloaded function found atan2
atan2 is not standard in GLSL, try atan instead (it has a version which takes 2 arguments too).
But I still can't find your call to atan2 in the shader you posted. Am I blind?
-
Sorry, wrong line, I meant this:
too many arguments contructor
Also, hmm I used atan but my friend's using atan2 and it's working on his PC. Also I'll past other shader which I triend and which caused these errors which I mentioned before when I get home.
-
Sorry, wrong line, I meant this:
too many arguments contructor
Can't you just copy and paste the shader and the exact error output from the GLSL compiler? ;)
Also, hmm I used atan but my friend's using atan2 and it's working on his PC
Different OpenGL drivers implement different GLSL instructions sets (I don't know if they are non-standard extensions, or rather just newer versions of GLSL).
So you should limit yourself to the most standard/basic/official set of instructions if you want maximum portability.