Some Advancements in the Shaders

I have played with the shaders in the renderer. Now it supports glow maps and specular maps. The specular map is used in two ways. On the one part, it is used as a specular term in the light equation in the lighting pass. On the other part, it is used to add some environment reflections on objects in the final pass.

The terrain shader blends between multiple textures depending on the terrain slope and height. The shading is done in runtime so the changes in the terrain geometry caused by the erosion simulation are properly appearing in the rendering.

Here are some images about the results.

To emphasize the effects of environment reflections (and to make calculations simpler), I have replaced the procedural skybox to a static HDR environment cube map.

Update 10/01/12: I have found a bug in the shaders. I have fixed it, and I have done some modelling to see the results. I have obtained some (cars and dumpster) from TurboSquid too, and I have put some new images to the slideshow to show the results.

This slideshow requires JavaScript.


Posted on January 6, 2012, in 3D programming, Deferred Shading, GLSL and tagged , , , . Bookmark the permalink. 2 Comments.

  1. hello
    regota kovetem a blogod, nagyon jol halad az engine, gratula hozza 🙂
    lenne egy kerdes: az engine osszehozhato lesz esetleg majd fizika-enginekkel? pl.:


    • Szia!

      Köszi szépen. 🙂 Nemcsak hogy öszehozható, de már van is benne Physx, csak most épp nem sikerült beszerezni az SDK aktuális változatát, és ezért nincs belefordítva. Pedig az új gépen kipróbálnám, hogy hogyan muzsikál… 🙂


Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: