Environment mapping using cube mapping.
Even though the room appears to be static but the app is actually implemented with dynamic environment mapping technique.
Each side of the room is a quad with its own texture.
In every frame, the camera is placed at the center of the room and renders each side of the room into a cube map texture.
The cube map texture generated then being used as a texture resource for the cube object at the center of the room to create environment mapping effect.
Each side of the cube object at the center of the room is detached from the others and does not share vertices, also each side of the cube object has its own normal vector.
Camera can be moved freely in the room(touch dragging) and is designed to prevent gimbal lock situation.
The cube object’s orientation can also be changed.
The direction and axis of rotation while changing the cube’s orientation are based on the camera’s position and orientation, not on the local axes of the cube object.
Platform: iOS
Programming Language: Objective-C, C/C++, GLSL
Device: iPad Air
Sonic the Hedgehog and its characters are properties of Sega Corp.