Is there a way in OpenGL ES to do flat shading without repeating each vertex for every triangle?
In regular OpenGL this is done with glShadeModel
but in ES I write the shaders so its not that simple.
GLSL 1.3 or 1.4 (not sure) introduces the keyword flat
which seem to enable this but unfortunately ES 2.0 doesn't have this yet.
Yet another way to do this uses dFdx
,dFdy
functions which, alas, are also missing in ES.
No, flat-shading is not a feature of OpenGL ES 2.0, sorry.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With