OpenGL ES:在不复制顶点的情况下进行平面着色吗? [英] OpenGL ES: flat shading without duplicating vertices?

查看:100
本文介绍了OpenGL ES:在不复制顶点的情况下进行平面着色吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OpenGL ES中,有没有一种方法可以进行平面着色而无需为每个三角形重复每个顶点?

Is there a way in OpenGL ES to do flat shading without repeating each vertex for every triangle?

在常规OpenGL中,这是通过glShadeModel完成的,但是在ES中,我编写了着色器,所以并不是那么简单.

In regular OpenGL this is done with glShadeModel but in ES I write the shaders so its not that simple.

GLSL 1.3或1.4(不确定)引入了关键字flat,该关键字似乎启用了此功能,但不幸的是ES 2.0尚没有此功能.

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.

另一种实现方法是使用dFdxdFdy函数,可惜,ES中也缺少这些函数.

Yet another way to do this uses dFdx,dFdy functions which, alas, are also missing in ES.

推荐答案

否,对不起,平面着色不是OpenGL ES 2.0的功能.

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

这篇关于OpenGL ES:在不复制顶点的情况下进行平面着色吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆