I created a demo for distance field contour texturing (Green’s method from Siggraph 2007), but ran into a strange bug. ATI hardware behaves like expected, but on Nvidia hardware, the dFdx() and dFdy() functions, and the related fwidth(), behaves erratically.
Please have a look at the demo linked from:
(Windows, Mac and Linux versions are available.)
The strange and nasty artefacts occur when the textured plane is rotated out of the screen plane, using ctrl-vertical mouse drag in the demo.
Any ideas what causes this? I would love to present a demo that works on both platforms, and I see no reason why it shouldn’t work. What am I doing wrong? The problematic shader is in the file “fragment1.glsl” in the demo archive.