A simple PBR/IBL material viewer with drag and drop functionality written in C++/OpenGL.
- Drag and drop an equirectangular HDR image in the viewport to automatically generate the required cubemaps for Image-Based Lighting (hdrlabs has a nice collection of environment maps).
- Drag and drop individual images in the material components (albedo, normal, metallic, roughness, ambient occlusion, displacement) to change the material's appearance (freepbr has a nice collection of different material textures).
- Adjust the displacement amount and texture scale.
- Toggle rotation and wireframe.
- Toggle and move a point-light around the scene.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Please note that Windows is the only supported platform at the moment.
- A modern C/C++ compiler
- OpenGL 3.3+
- CMake 3.0+ installed
git clone https://github.com/FrMarchand/pbr-material-viewer.git
cd pbr-material-viewer
mkdir build
cd build
cmake ..
You can then open the generated project files in your IDE or build the project directly with cmake
cmake --build . --config Release
In order to keep things simple, building this project will generate a standalone executable. Shaders and other resources are embedded in the program during compilation.
- glad - Multi-Language Loader-Generator based on the official specs.
- glfw - Library for creating windows, contexts and surfaces, receiving input and events.
- glm - C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.
- dear imgui - Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.
- stb-image - Image loading/decoding from file/memory
- cmrc - Standalone CMake-Based C++ Resource Compiler
François Marchand - FrMarchand
This project is licensed under the MIT License - see the LICENSE file for details
This project was based on the PBR tutorial series provided by learnopengl.com, a great resource for anything related to OpenGL.