OpenGL ES: flat shading without duplicating vertices?

大城市里の小女人 提交于 2019-12-12 10:37:58

问题


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.


回答1:


No, flat-shading is not a feature of OpenGL ES 2.0, sorry.



来源:https://stackoverflow.com/questions/4851501/opengl-es-flat-shading-without-duplicating-vertices

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!