GLSL shader failed to compile
Fragment shader failed to compile with the following errors:
ERROR: 0:16: error(#143) Undeclared identifier: atan2
ERROR: 0:16: error(#202) No matching overloaded function found: atan2
ERROR: error(#273) 2 compilation errors. No code generated
Do you have a NV card? NV drivers are problematic for develop OpenGL...(atan2 isn't available in GLSL, this is the same situation like with a float4 etc, IIRC you can avoid those problems by adding '#version 110' or higher - NV drivers works better if you provide '#version').
Anyway this demo looks really nice, thanks for share it!
Cheers,
Even with a #version 300 atan2 still gives out an error on non-nv cards since it really doesn't exist in GLSL, nv cards introduce a tone of errors on multiple shaders because they are very permissive when it come to lack of identifiers or simply using hlsl or cg commands on glsl that others cards simply wont tolerate, in any case and if i am not mistaken HLSL atan2(x,y) == GLSL atan(y,x) that said it should be a easy fix
From what kinkreet, this seem only available on GLSL 4.0+ This would be very restrictive (particulary for intel hardware)
Is there an equivalent way of doing the ATAN command without requiring GLSL 4.0?
Oups. I did not see the bottom of the page. The header was " atan - OpenGL 4 Reference..." Did not see the bottom that said that it's available since almost the beginning. So it should not give a syntax error then... This reference page is coming from the Kronos group, so if a compiler doesn't understand that command they don't follow the standard. (Unless Kronos changed the name during the years)