views:

1913

answers:

2

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

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

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 also mentions the GL extensions are not enabled for developers.

A: 

It seems to be possible (at least when using OpenGL ES 1.1+), but I also couldn't find any tutorials on how to do it. There's a GDC 2006 PDF that mentions it and there will be a Khronos Group course about techniques like this one.

It's also mentioned in the "OpenGL ES 1.1 in more detail" chapter on this page.

schnaader
+7  A: 

@CVertex

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

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.

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.

Kevin Doolan