Skip to content

Tutorial 3. Normal Maps

Timur Gafarov edited this page Oct 16, 2023 · 10 revisions

Dagon version: >=0.14

Normal mapping nowadays is a standard technique that is used by everyone. You can easily add it to your Dagon game by setting normalTexture of a material:

matGround.normalTexture = aTexStoneNormal.texture;

Dagon also supports parallax mapping. It requires a height map:

mGround.heightTexture = aTexStoneHeight.texture;
mGround.parallaxMode = ParallaxSimple;

Browse source code for this tutorial