Random compilation problems


I’m getting strange random compiler errors.

0(222) : error C3002: call to undefined function “vec3 ddx(vec3);”
for a shader using dFdx.
This doesn’t happen all the time, but instead randomly when linking/compiling the shader program.
I couldn’t reproduce this unfortunately for a sample application, but can provide the shader code if needed over a non public channel.

Windows 7

I had the same problem. I saw the error only the first time I tried compiling the shaders. It turned out I had a method that was not used in the vertex shader source that called dFdx. Excluding the method from the vertex shader source fixed the error.