Git Product home page Git Product logo

pkrenderer's Introduction

PK Renderer

A physically based real-time renderer made with C++, GLSL & Vulkan.

The goal of this project is to be a feature rich & performant renderer without any precomputed scene structures or light transport. The visual target is to get as close as possible to path-traced reference lighting. The performance target is to stay at a stable 6.94ms/144hz framerate at 1080p on a RTX 2080 TI. However, this is ultimately a hobby project & thus likely to remain perpetually a work in progress.

Previews


Features

Ray Traced Global Illumination
  • Screen space radiance cache (for ray traced radiance).
  • Voxel cone traced world space radiance cache.
  • Basic ReSTIR for diffuse hits.
  • Recurrent blur denoiser.
  • Volumetrics integration.
  • Rough specular approximation from diffuse SH1.
  • Async TLAS & BLAS builds.
Analytic Lights
  • Spot, point & directional lights.
  • Spherical area light estimation for all types.
  • Poisson PCF shadow filtering.
  • PCSS shadow filtering for directional lights.
  • Bend screen space shadows.
  • Directional shadow cascades.
  • Clustered forward rendering.
Shading
  • PBR BxDF
    • Chan Diffuse term
    • GGX normal distribution term.
    • Smith GGX correlated visibility term.
    • Hanrahan Krueger sub surface term.
    • Clear coat support.
    • Sheen support.
  • PBR volumetric fog.
  • Octahedron mapped GGX HDR IBL (used for rt & sky).
  • Spherical harmonics convolution from from IBL (for volumetrics).
  • GBuffers (normals, roughness, min/max/avg hierarchical depth).
Post Processing
  • Temporal antialiasing.
  • HDR bloom.
  • Luminance histogram based auto exposure.
  • Bokeh depth of field & auto focus.
  • GT Uchimura tone mapping.
  • Color grading.
  • Film grain.
  • Vignette.
Meshlet Rendering
  • 16 byte vertex packing.
    • unorm 16 xyz vertex position relative to submesh aabb.
    • r4g4b4 color
    • tangent sign 1 bit
    • half2 texcoord
    • 10r10b10g2a quaternion.
  • task shader cone culling.
  • task shader frustum culling.
  • global virtual buffers for all geometry resources.
  • dynamically batched draw calls.
  • material batching.
    • all material properties in a single buffer.
    • shader specific property layout & offset to property buffer.
Architecture
  • Vulkan 1.3 rendering backend.
  • Async compute & transfer queues.
  • Multiple buffering.
  • Automatic resource barrier management.
  • Entity component system.
  • Custom compressed mesh & shader formats.
  • Asset hot reloading
  • Console command interface.
Planned
  • geometry lods.
  • skinned geometry.
  • GPU culling.
  • SH probe based world space radiance cache.
  • GPU particle engine.
  • DX12 backend (unlikely... cant do async ray trace afaik).
  • Serialized scene representation.

Dependencies

Required Vulkan & GLSL Features & Extensions
Vulkan Version 1.3
SPRIV Version 1.6

GLSL Extensions:
- GL_EXT_shader_explicit_arithmetic_types
- GL_EXT_nonuniform_qualifier
- GL_ARB_shader_viewport_layer_array
- GL_EXT_ray_tracing
- GL_KHR_shader_subgroup_ballot
- GL_EXT_control_flow_attributes
- GL_KHR_shader_subgroup_ballot
- GL_KHR_shader_subgroup_arithmetic
- GL_KHR_shader_subgroup_shuffle
- GL_KHR_shader_subgroup_vote
- GL_EXT_ray_tracing_position_fetch
- GL_EXT_mesh_shader

Validation layers:
- VK_LAYER_KHRONOS_validation

Instance Extensions:
- VK_EXT_debug_utils
- VK_KHR_get_physical_device_properties2

Device Extensions:
- VK_KHR_surface
- VK_KHR_win32_surface
- VK_KHR_swapchain
- VK_KHR_deferred_host_operations
- VK_KHR_acceleration_structure
- VK_KHR_ray_tracing_pipeline
- VK_KHR_ray_query
- VK_EXT_conservative_rasterization
- VK_KHR_ray_tracing_position_fetch
- VK_EXT_mesh_shader
- VK_KHR_fragment_shading_rate

Physical Device Requirements:
- alphaToOne
- shaderImageGatherExtended
- sparseBinding
- sparseResidencyBuffer
- samplerAnisotropy
- multiViewport
- shaderSampledImageArrayDynamicIndexing
- shaderUniformBufferArrayDynamicIndexing
- shaderFloat64
- shaderInt16
- shaderInt64
- imageCubeArray
- fragmentStoresAndAtomics
- multiDrawIndirect
- storageBuffer16BitAccess
- uniformAndStorageBuffer16BitAccess
- storagePushConstant16
- shaderUniformBufferArrayNonUniformIndexing
- shaderSampledImageArrayNonUniformIndexing
- runtimeDescriptorArray
- descriptorBindingVariableDescriptorCount
- descriptorBindingPartiallyBound
- scalarBlockLayout
- shaderFloat16
- shaderInt8
- shaderOutputViewportIndex
- shaderOutputLayer
- bufferDeviceAddress
- timelineSemaphore
- hostQueryReset
- accelerationStructure
- rayTracingPipeline
- rayQuery
- maintenance4
- rayTracingPositionFetch
- taskShader
- meshShader
- multiviewMeshShader
- primitiveFragmentShadingRateMeshShader
- pipelineFragmentShadingRate
Libraries & Dependencies

Platform & Build Support

Warning The project has only been tested on Windows 10, support for systems or versions is untested.

Warning The project has only been tested on an NVIDIA RTX 2080 TI, support for other vendors or devices is untested.

Warning Building requires MSBuild and a C++17 standard compatible version of MSCV or clang-cl.

Warning Building only the PKRenderer project requires a compatible build of PKAssetTools.

Build using MSBuild CLI:

msbuild.exe PKRenderer.sln /property:Configuration=Release or

msbuild.exe PKRenderer.sln /property:Configuration=ClangRelease or

msbuild.exe PKRenderer.sln /property:Configuration=Debug or

msbuild.exe PKRenderer.sln /property:Configuration=ClangDebug or

through Visual Studio (you know how that goes).

Transfer to a more portable build system is planned but has a very low priority.

pkrenderer's People

Contributors

konstatoivanen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pkrenderer's Issues

Failed to create logical device (GeForce GTX 1060 6GB)

Hello,

When I run PKRenderer.exe (version 1.0), I get this critical error:

 Selected Physical Device 'NVIDIA GeForce GTX 1060' from '2' physical devices.
   Vendor: 4318
   Device: 7200
   Driver: 2143666176
   API VER: 1.2

[...]

Device Extension: VK_NVX_multiview_per_view_attributes (C:\WINDOWS\System32\DriverStore\FileRepository\nvamig.inf_amd64_2845149b505e4dbf\.\nvoglv64.dll) version 0.0.1
vkCreateDevice:  Failed to create device chain.
Failed to create logical device!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.