hunterloftis / pbr

a Physically Based Renderer (PBR) in Go
MIT License
1.15k stars 42 forks source link

Normal maps #32

Open hunterloftis opened 6 years ago

hunterloftis commented 6 years ago

Normal maps modify the normals used to calculate lighting at a point on a face. Currently, every Object in pbr provides the normal at a point. There's a place in the At function to add a normal map value to the computed normal and return that instead.

Normal maps are already loaded in along with other textures, they just aren't used.

Adding normal maps will greatly enhance the detail and realism of surfaces by allowing surfaces that have texture.