AnsweredAssumed Answered

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

Question asked by manny85 on Jul 25, 2014

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.

Outcomes