Environment Map

Continuing with the engine series, I’ve coded environment map support. I think it’s vertically inverted, but it’s late and maybe I can’t see properly. Calculating the environment map, has been easy. I’ve simply had to compute average normal vector for each vertex and transform it appropriately to view camera space. The resulting transformed vector, will be used to address texture space by converting vectors x and y coordinates to texture space. This process, it not much more expensive in cpu time than simply texturing triangles.

Environment Map live demo:

https://hypertolosana.github.io/environment-map/index.html

As usual, chrome will be the preferred browser to watch at EnvironmentMap demo.

Thank you for stopping by.

One thought on “Environment Map”

  1. Wonderful examples! It’s awesome to see how smooth it runs, and last time I saw that bust was in VRML back in 1999! In what format are the models, and how do they load…ah, maybe you’ll get the time to put an article up soon? Good luck!/D

    Like

Leave a comment