Experiment after reading Physically Based Rendering by Imad Rahmoune.
Renders a textured sphere using the Cook-Torrance BRDF (GGX normal distribution, Smith geometry, Fresnel-Schlick) with tangent-space normal mapping and a single point light.
- OpenGL 3.3+
- GLFW3 (window and input)
- GLEW (OpenGL extension loading)
- stb_image.h (included in the repo)
On Debian/Ubuntu:
sudo apt install libglfw3-dev libglew-devmake
./pbrRun from the current directory (shaders and textures are loaded relative to the working directory).
Left-drag: Orbit camera Scroll: Zoom Escape: Quit