cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

manny85
Journeyman III

glsl dFdy() is sign-flipped on ATI card.

I used dFdx() and dFdy() to calculate flat normal instead of using geometry shader.

the code like below,

     vec3 normal = cross(dFdx(position), dFdy(position));

I works fine, but dFdy() is sign-flipped on my ATI card(HD7900).

So, I changed the code like below, when GL_VENDOR is AMD,

     vec3 normal = cross(dFdx(position), - dFdy(position));

Is all of the ATI card return sign-flipped dFdy() value ?

Is my processing about ATI card correct ?

Any comments would be helpful.

0 Likes
0 Replies