Bump映射在iPhone上 [英] Bump Mapping on the iPhone

查看:105
本文介绍了Bump映射在iPhone上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iPhone上使用OpenGL ES,是否可以进行凹凸映射(使用正常的扰动图)?

Using OpenGL ES on the iPhone, is it possible to do bump mapping (using normal perturbation maps)?

从我的google搜索,看起来OpenGL ES扩展

From my google searching, it seems the OpenGL ES extension that supports it doesn't allow bump mapping.

根据这家伙为游戏中间件编写iphone,可以看到硬件的潜力通过观看演示在imgtec网站iPhones图形芯片的标记)。其中一个演示是凹凸映射演示。但是没有找到源。

According to this guy that writes gaming middleware for the iphone, one can see the potential of the hardware by watching demos on th imgtec site (the marker of the iPhones graphics chip). One such demo is a bump mapping demo. But there's no source to be found.

Kevin Doolan 还提到没有为开发人员启用GL扩展。

Kevin Doolan also mentions the GL extensions are not enabled for developers.

推荐答案

@CVertex

iPhone上支持DOT3混合模式,这是您所需要的。

The DOT3 blending mode is supported on the iPhone which is the very least you need in order to do it.

顶点程序扩展没有暴露在iPhone上,但它不是必需的。在这种情况下,扩展的目的是允许您将光向量转换为切线空间 - 但正如我在我的博客上提到的,这是你可以在CPU上做的东西,只是饲料的结果(作为顶点颜色,编码为DOT3格式法线)到GL。它显然比如果你能使用一个顶点程序慢得多。如果你正在进行对象空间凹凸贴图,那么你不需要转换光矢量,或者在顶点级别对其进行编码 - 你只需将它作为一个常量颜色输入。

The Vertex Program extension isn't exposed on the iPhone, but that it is not required. The purpose of the extension in this case is to allow you to transform the light vector into Tangent space - but as I mentioned on my blog, this is something you can do on the CPU and just feed the results (as vertex colors, encoded as DOT3 format normals) to GL. It will obviously be much slower than if you were able to use a Vertex Program. If you are doing Object Space bump mapping, then you don't need to transform the light vector, or encode it at the vertex level - you can just feed it in as a constant color.

imgtec网站上提供的 IS 的凹凸贴图演示的完整来源。下载1.x SDK,此处。这是一个演示对象空间碰撞
映射(搜索PolyBump)。

The full source for the bump mapping demo you referred to IS available on the imgtec site. Download the 1.x SDK, available here. It is a demo of Object Space bump mapping (search for PolyBump).

KevinD。

这篇关于Bump映射在iPhone上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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