All Projects → pezcode → Cluster

pezcode / Cluster

Licence: mit
Clustered shading implementation with bgfx

Projects that are alternatives of or similar to Cluster

Softwarerenderer
Software rendering engine with PBR. Built from scratch on C++.
Stars: ✭ 323 (+79.44%)
Mutual labels:  graphics, shaders, physically-based-rendering
Renderer
A shader-based software renderer written from scratch in C89
Stars: ✭ 1,366 (+658.89%)
Mutual labels:  graphics, shaders, pbr
Pbr
An implementation of physically based shading & image based lighting in D3D11, D3D12, Vulkan, and OpenGL 4.
Stars: ✭ 722 (+301.11%)
Mutual labels:  graphics, pbr, physically-based-rendering
Quartz
Vulkan RTX path tracer with a declarative ES7-like scene description language.
Stars: ✭ 367 (+103.89%)
Mutual labels:  graphics, pbr, physically-based-rendering
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (+0.56%)
Mutual labels:  graphics, pbr, physically-based-rendering
Hybridrenderingengine
Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
Stars: ✭ 563 (+212.78%)
Mutual labels:  graphics, shaders, physically-based-rendering
Unity Dithered Transparency Shader
Unity material and shader for applying clipped, dithered transparency
Stars: ✭ 174 (-3.33%)
Mutual labels:  graphics, shaders
Shaderworkshop
Interactive GLSL fragment shaders editor made with Qt
Stars: ✭ 43 (-76.11%)
Mutual labels:  graphics, shaders
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+6398.89%)
Mutual labels:  graphics, shaders
Hlslexplorer
See how hardware understands your HLSL
Stars: ✭ 91 (-49.44%)
Mutual labels:  graphics, shaders
Smo Shaders
A collection of shaders to replicate those used in Super Mario Odyssey's Snapshot Mode.
Stars: ✭ 97 (-46.11%)
Mutual labels:  graphics, shaders
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+1053.89%)
Mutual labels:  graphics, shaders
Shadertoy Rs
A desktop client for Shadertoy written in Rust
Stars: ✭ 41 (-77.22%)
Mutual labels:  graphics, shaders
Pbr White Paper
⚡️基于物理的渲染(PBR)白皮书 | White Paper of Physically Based Rendering(PBR)
Stars: ✭ 780 (+333.33%)
Mutual labels:  pbr, physically-based-rendering
Physhader For Mantra
A set of physical-based shaders for Mantra renderer
Stars: ✭ 54 (-70%)
Mutual labels:  shaders, pbr
Directxtk12
The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
Stars: ✭ 765 (+325%)
Mutual labels:  graphics, shaders
Filament
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Stars: ✭ 13,215 (+7241.67%)
Mutual labels:  graphics, pbr
Tinyrenderer
A brief computer graphics / rendering course
Stars: ✭ 11,776 (+6442.22%)
Mutual labels:  graphics, shaders
Retrace.gl
Create, ray trace & export programatically defined Signed Distance Function CSG geometries with an API suited for generative art - in your browser! 🎉
Stars: ✭ 149 (-17.22%)
Mutual labels:  graphics, shaders
Gaiasky
Mirror of Gaia Sky repository hosted on Gitlab: https://gitlab.com/langurmonkey/gaiasky
Stars: ✭ 162 (-10%)
Mutual labels:  graphics, shaders

Cluster

Implementation of Clustered Shading and Physically Based Rendering with the bgfx rendering library.

Render result

Cluster light count visualization

Currently bgfx's OpenGL, DirectX 11/12 and Vulkan backends are supported. I've only tested on Windows 10 with an Nvidia GTX 1070. Other hardware or operating systems might have subtle bugs I'm not aware of.

Functionality

Live-switchable render paths

  • forward, deferred and clustered shading
  • output should be near-identical (as long as you don't hit the maximum light count per cluster)

Clustered Forward Shading

  • logarithmical depth partition
  • compute shader for cluster generation
  • compute shader for light culling
    • AABB test for point lights
  • cluster light count visualization

Deferred Shading

  • G-Buffer with 4 render targets
  • light culling with light geometry
    • axis-aligned bounding box
    • backface rendering with reversed depth test
    • fragment position reconstructed from depth buffer
  • final forward pass for transparent meshes

Forward Shading

Very simple implementation, might be useful to start reading the code

Physically Based Rendering (PBR)

Tonemapping

HDR tonemapping postprocessing with different operators:

References

A few useful resources that helped with the implementation:

Compilation

CMake (>= 3.2) is required for building.

  1. Generate project files:

    mkdir build
    cd build
    # e.g. VS 2019, compile for x64 platform
    cmake -G "Visual Studio 16 2019" -A x64 ..
    cd ..
    
  2. Build. Open the project files with your IDE/build tool, or use CMake:

    cmake --build build/ --parallel --config Release
    

You can also grab a compiled copy for Windows with the Sponza model from the Releases page.

Libraries

Assets

License

This software is licensed under the MIT License. Basically, you can do whatever you want with it, as long as you don't remove the license and copyright notice from relevant pieces of code.

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