All Projects → Nadrin → Pbr

Nadrin / Pbr

Licence: mit
An implementation of physically based shading & image based lighting in D3D11, D3D12, Vulkan, and OpenGL 4.

Projects that are alternatives of or similar to Pbr

Diligentcore
Core functionality of Diligent Engine
Stars: ✭ 263 (-63.57%)
Mutual labels:  opengl, graphics, vulkan, d3d11, d3d12
Shaderconductor
ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages
Stars: ✭ 1,146 (+58.73%)
Mutual labels:  opengl, graphics, vulkan, d3d11, d3d12
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+1319.94%)
Mutual labels:  opengl, graphics, vulkan, d3d11, d3d12
Renderdoc
RenderDoc is a stand-alone graphics debugging tool.
Stars: ✭ 5,969 (+726.73%)
Mutual labels:  opengl, graphics, vulkan, d3d11, d3d12
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+196.68%)
Mutual labels:  opengl, vulkan, pbr, d3d11, d3d12
Gpu performance api
GPU Performance API for AMD GPUs
Stars: ✭ 170 (-76.45%)
Mutual labels:  opengl, vulkan, d3d11, d3d12
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-74.93%)
Mutual labels:  opengl, graphics, pbr, physically-based-rendering
Reshade
A generic post-processing injector for games and video software.
Stars: ✭ 2,285 (+216.48%)
Mutual labels:  opengl, vulkan, d3d11, d3d12
Llgl
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
Stars: ✭ 1,011 (+40.03%)
Mutual labels:  opengl, vulkan, d3d11, d3d12
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (-80.89%)
Mutual labels:  opengl, vulkan, d3d11, d3d12
Klayge
KlayGE is a cross-platform open source game engine with plugin-based architecture.
Stars: ✭ 1,646 (+127.98%)
Mutual labels:  opengl, graphics, d3d11, d3d12
Filament
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Stars: ✭ 13,215 (+1730.33%)
Mutual labels:  opengl, graphics, vulkan, pbr
Quartz
Vulkan RTX path tracer with a declarative ES7-like scene description language.
Stars: ✭ 367 (-49.17%)
Mutual labels:  graphics, vulkan, pbr, physically-based-rendering
Apitrace
Tools for tracing OpenGL, Direct3D, and other graphics APIs
Stars: ✭ 2,198 (+204.43%)
Mutual labels:  opengl, d3d11, d3d12
Pmtech
Lightweight, multi-platform, data-oriented game engine.
Stars: ✭ 478 (-33.8%)
Mutual labels:  opengl, vulkan, d3d11
Saba
OpenGL Viewer (OBJ PMD PMX)
Stars: ✭ 208 (-71.19%)
Mutual labels:  opengl, vulkan, d3d11
ocat
The Open Capture and Analytics Tool (OCAT) provides an FPS overlay and performance measurement for D3D11, D3D12, and Vulkan
Stars: ✭ 233 (-67.73%)
Mutual labels:  vulkan, d3d12, d3d11
Bansheeengine
Modern C++14 game engine with Vulkan support, fully featured editor and C# scripting
Stars: ✭ 2,906 (+302.49%)
Mutual labels:  opengl, graphics, vulkan
Gfx
[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
Stars: ✭ 5,045 (+598.75%)
Mutual labels:  opengl, graphics, vulkan
Silk.net
The high-speed OpenAL, OpenGL, Vulkan, and GLFW bindings library your mother warned you about.
Stars: ✭ 534 (-26.04%)
Mutual labels:  opengl, graphics, vulkan

Physically Based Rendering

(c) 2017 - 2018 Michał Siejak (@Nadrin)

An implementation of physically based shading model & image based lighting in various graphics APIs.

Screenshot

API SLOC Implementation status
OpenGL 4.5 508 Done
Vulkan 1843 Done
Direct3D 11 673 Done
Direct3D 12 1205 Done

About

The goal of this project is to showcase the use of various modern graphics APIs and to provide a clear side-by-side comparison of them. I believe that an implementation of physically based shading is a sufficiently non-trivial use case for that comparison to be useful.

Each implementation is completely self contained within a single source/header pair residing directly in src directory. The coding style is mostly procedural ("C with classes") using simple POD structs for grouping related data together. This was done for simplicity, readability, and to not impose any particular renderer design/organization.

Shared functionality (loading of images & 3D models, application event loop & entry point, misc utility functions) can be found in src/common directory.

Please note that it was not my goal to try to come up with the most efficient/optimized use of each API. The rendered scene is very simple anyway (only handful of drawcalls, mostly static data), and when in doubt I tried to refrain from using "clever" tricks and went for simple solutions.

Shaders are heavily commented because there's where interesting stuff happens. :)

Building

Windows

Prerequisites

  • Windows 10 or Windows Server 2016 (x64 versions)
  • Visual Studio 2017 (any edition)
  • Relatively recent version of Windows 10 SDK
  • LunarG Vulkan SDK

How to build

Visual Studio solution is available at projects/msvc2017/PBR.sln. After successful build the resulting executable and all needed DLLs can be found in data directory. Note that precompiled third party libraries are only available for x64 target.

Linux

Prerequisites

  • C/C++ compiler supporting C++14
  • CMake 3.8 or newer
  • pkg-config
  • glslang from Khronos
  • Development files for GLFW3, Assimp, OpenGL & Vulkan

How to build

  1. Install prerequisites; for Debian/Ubuntu:
sudo apt install build-essential cmake pkg-config libglfw3-dev libassimp-dev libgl1-mesa-dev libvulkan-dev
  1. Download & install glslang. Make sure that glslangValidator binary is in PATH or in /opt/glslang/bin.

  2. Configure & build the project:

mkdir -p projects/cmake/build
cd projects/cmake/build
cmake ..
make install
  1. After successful build the resulting executable can be found in data directory.

macOS

Help wanted.

Running

Make sure to run from within data directory as all paths are relative to it. API to be used can be specified on the command line as a single parameter (-opengl, -vulkan, -d3d11, or -d3d12). When run with no parameters -d3d11 is used on Windows, and -opengl on other platforms.

Controls

Input Action
LMB drag Rotate camera
RMB drag Rotate 3D model
Scroll wheel Zoom in/out
F1-F3 Toggle analytical lights on/off

Bibliography

This implementation of physically based shading is largely based on information obtained from the following courses:

Other resources that helped me in research & implementation:

Third party libraries

This project makes use of the following open source libraries:

Included assets

The following assets are bundled with the project:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].