Extension Disabled?

So, I’m trying to export a shader I’ve made with oreo effect exporter. Ive made dozens of shaders so far with no issues… but this one keeps kicking back an error saying that the derivatives extension is disabled… (see pictures). How do I enable derivatives??? I can’t imagine why cocos wouldn’t allow us to use derivative or partial derivative when creating shaders??? can somebody please tell me this is a simple fix?


What version of engine are you using?

1 Like

you should use derivation instructions with version macro such as
#ifdef __VERSION__ >= 110 (or higher version)
  float dx = dFdx(output7);
#endif

1 Like

currently I am using 3.7.1

Thank you so much for your reply by the way!

thank you so much for your response! I am still very new to this and have only had experience writing shaders in Unity before… I’m not 100% sure I’m following your instructions correctly… should I be using
#ifdef or #ifdefined?
for the VERSION>= should I be specifying what version of openGL to use? or what version of the engine I’m using? Or should I type it out exactly like you did? So far I haven’t had any luck with this… but I’m still a bit of a novice when it comes to this part of shader programming. Most of the stuff I’ve worked with before didn’t require me doing anything like this.