I’m having a problem now. When I added “#extension GL_OES_standard_derivatives : enable” to my fragment shader code for using dFdx/dFdy such derivative function, I had a compiler error message: Unexpected extension directive encountered after non-preprocessor tokens.
However, if I remove the extension line, the derivative function can be used successfully. But if I want to run on the other non-powervr simulator (lower ES-SL version), I still need that extension line.
What I don’t get it is, if the extension derivative function is already supported for ES-SL 3.0 with powervr, why would we have an compiled error while adding that extension line? Is there any possible way to make that extension line work without getting compiled error? Otherwise I have to write two shader code, one for PowerVR, one for the other…
P.S The attachments is my OpenGL ES information by using PVRVFrame (from PowerVR SDK 3.5).