Skip to content

Klark007/Wulkan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

252 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wulkan

Wulkan is a personal Vulkan-based real-time renderer focused on learning modern graphics techniques and reproducing the visual quality of a path-traced reference image created during an ETH Computer Graphics course final project.

Showcase

Feature Overview

Feature Description
Terrain Tessellation Curvature- and distance-based dynamic tessellation with frustum culling
Shadows Cascaded Shadow Maps with Contact-Hardening Soft Shadows
OBJ Loading PBR-capable OBJ loading with PBR material support
CPU Instancing Supports CPU instancing with multiple different level of detail models
Tone mapping Supports multiple tone mappers such as Rheihard, ACES & AgX

Installation

Supported platforms: Windows

Prebuild binaries

Add binary into the Wulkan folder and execute from there

Windows Compilation

Requirements:

  • Vulkan SDK 1.3+ with TODO
  • Visual Studio 2022

Steps:

  1. Open Wulkan.sln in Visual Studio
  2. Set the Vulkan SDK paths:
    • Add VulkanSDK\<Version>\Lib to Linker -> General -> Additional Library Directories
    • Add VulkanSDK\<Version>\Include to VC++ Directories -> External Include Directories
  3. Build in Release or Debug

Technical details

Terrain with Dynamic Tesselation based on curvature and distance

Uses mean curavture (precomputed) and distance to camera to decide how much to tesselate. If a patch is completly outside of the camera frustum, it gets culled.

Left we show a height map and on the right how it looks in the engine with mean curavture being visualized (from least to most: green, blue, red)
Heightmap 1 Tesselation 1

The non symmetry is due to how we use finite difference to estimate the curvature

Heightmap 2 Tesselation 2 Terrain Tesselation

Visualize terrain with tesselation strength

Terrain Wireframe

Shows tesselated terrain with diffuse lighting and its corresponding wireframe

Shadows

Implements cascaded shadow maps with contact hardening soft shadows

No Shadow No shadows Hard Shadow Hard shadows Soft Shadow Soft shadows

Shows the difference between no shadows, hard shadows and soft shadows. Most notable on the shadow of the baloon in the left half of the images

Cascades

Visualize the different cascades given the shown camera frustum

Obj Support

Enables loading Obj files using tinyobjloader. Supports PBR Materials supporting diffuse, metallic, roughness parameters and diffuse textures.

Basic OBJ

Shows a simple OBJ file being loaded into the engine

Basic OBJ

Test scene with a more complex, textured material

TODO Mipmapped Textures

Mipmapped Textures CPU Instancing and LOD

Tonemapping

Implements different tonemappers as a post processing step (full screen quad) before ImGUI draws it's UI ontop.

None 1 None 2

No tonemapper

Rh 1 Rh 2

Rheinhard on Luminance

Ext Rh 1 Ext Rh 2

Extended Rheinhard on Luminance

Uch 1 Uch 2

Uncharted / Hable Filmic with default parameters

ACES 1 ACES 2

ACES tone mapper

AGX 1 AGX 2

AgX with Punchy preset

The white point for extended rheinhard is set using the GUI. Uncharted 2's tonemapper is shown with the default values from the following blog and the plan is to replace it with a tonemapper with more understandable parameters (New Hable filmic).

Pathtraced Inspiration

This image is meant as a visual target to inspire which feature to add to the project and the goal is not prefect parity. Trade off's will need to be made due to real time constraints.

Render Pathtraced image for my final project in ETH Computer graphics course (two person project).
Lower half of image is used as inspiration/goal for this real time project

Dependencies

  • GLFW
  • Volk
  • vk-bootstrap
  • vma
  • imgui
  • glm
  • rapidcsv
  • stb_image
  • tinyexr
  • miniz (used by tinyexr)
  • tph_poisson
  • tracy
  • tinyobjloader

Models

Roadmap

For a roadmap see Wulkan/TODO.md

About

a real-time renderer to learn new things with

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published