DDX/DDY on Android for Flat Shading

Hi all,

I am trying to achieve flat shading with the below material:

This has worked great on PC but when I try to make it for mobile the engine tells me that DDX and DDY are not available on ES2. I think this is because they are GPU features (but that is beside the point). I have looked around a bit and found a number of people asking for a mobile equivalent but have not found a good solution yet.

Does anyone know of an alternvite to DDX/DDY flat shading on Android devices. I am currently using a Nexus 5X.

Good day. Screen-space derivatives(ddx and ddy) are not avaliable on mobile platforms.

I assume you are willing to create flat shading effect for your material. If that is the case, you have to either import the model with hard edges, or modify the vertex shader.
Alternatively, you can check this forum thread. Maybe you could fake the whole effect, like it is described on one of the pictures in the above-mentioned thread.