Skip to content

A simple PBR/IBL material viewer with drag and drop functionality written in C++/OpenGL

License

Notifications You must be signed in to change notification settings

FrMarchand/pbr-material-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PBR Material Viewer

A simple PBR/IBL material viewer with drag and drop functionality written in C++/OpenGL.

Real-time PBR

Features

  • 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.

Getting Started

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.

Prerequisites

  • A modern C/C++ compiler
  • OpenGL 3.3+
  • CMake 3.0+ installed

Building the project

Git clone

 git clone https://github.com/FrMarchand/pbr-material-viewer.git
 cd pbr-material-viewer

Generate project files

 mkdir build
 cd build
 cmake ..

You can then open the generated project files in your IDE or build the project directly with cmake

Build 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.

Libraries

  • 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

Author

François Marchand - FrMarchand

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

This project was based on the PBR tutorial series provided by learnopengl.com, a great resource for anything related to OpenGL.

About

A simple PBR/IBL material viewer with drag and drop functionality written in C++/OpenGL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages