Enhanced iPhone Renderers

During the last week most of my work was focused on enhancing the iPhone renderers to support real-time lighting and material colors.

The following screenshots show the OpenGL ES 1.x renderer in action, with both real-time lighting and diffuse colors enabled:

The OpenGL ES 2 renderer was upgraded as well. GLSL support was improved in order to handle light and material attributes. Here are some screenshots:

 

Per-vertex lighting

 

 

Simple lighting and material colors

 

 

Per-pixel lighting

 

But, what’s the point of implementing a shader-based renderer if we’re going to obtain the same results as with a fixed-function one? The next picture shows the same scene rendered with a non-photorealistic shader in order to achieve a cartoon-like effect known as Toon Shading:

 

Toon Shading

 

I also created a simple application in order to testing different effects without having to recompile everything. The app presents a basic menu that lets you choose what OpenGL ES version to use (either 1.x or 2.x), what models and textures to render (from a predefined list) and finally what kind of effect you want to use (which are only valid if you chose the GLES 2.x renderer).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s