Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Example of Normal Mapping

edited February 2014 in Shaders Posts: 49

After picking up Codea again after a few months, I finally decided to take a dive into shaders. Getting a crude knowledge after experimenting with the glsl API in yoyogame's GameMaker and playing with editing the shaders in Codea, I decided it was time I tried something cool: Normal mapping! I know it's been done before, I just wanted to try it and it seemed like a good way to get into shaders. Feb 19, 7 15 46 AM.jpg Feb 19, 7 16 08 AM.mp4

The idea of using a high resolution mesh's normal map on a low resolution for better lighting is a trick that game developers have been using for years to give the impression of an extremely high poly count. The borders of the object (in camera space) still appear low res, but with lighting trickery, everything in between has bumps and curves.

Not wanting to dive completely into 3D yet (although it wouldn't be too hard) I whipped up this quick example using:

Here is the so desired code

Links for images I used:

Color map ::

Normal map ::

Sorry about the lack of comments inside of the code. If you want to know more, use the tutorial linked above.


Sign In or Register to comment.