Limited domain of GLSL atan function

Discussion created by acmihal on Nov 6, 2008


    I've noticed that the GLSL atan(y, x) function appears to only return a correct result when x >= 0.0 and x > abs(y). Thus the result is limited to -pi/4 to pi/4. Anything outside of this range seems to have a significant error. I am using a x1650 pro card on linux with driver 8.54.3.

I can live with this limitation since it is straightforward to write a wrapper function that will work over the full -pi to pi range. However, I'd like to know in what circumstances I need to use such a workaround. Is this limitation a known issue, and does it affect all AMD cards, or just certain cards?