GithubHelp home page GithubHelp logo

bidirectional_path_tracer's Introduction

Cornell box done in glTF format, with caustics.

Large-format screenshots may require a TDR time extension, if your framerate dips below 1 FPS, like on my 3060:

KeyPath : HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\GraphicsDrivers
KeyValue : TdrDelay
ValueType : REG_DWORD (32bit)
ValueData : Number of seconds to delay. 2 seconds is the default value.

Based off of Sascha Willems' raytracingreflections code.

Model by Rob Rau.

image

To obtain and compile the demo code:

Obtain the files

  1. Download the base code from: https://github.com/SaschaWillems/Vulkan

  2. Extract Vulkan-master directory to your hard drive (e.g. C:/dev/Vulkan-master/)

  3. Open command prompt, change directory to C:/dev/Vulkan-master/

  4. Type: cmake -G "Visual Studio 17 2022" -A x64

  5. Download the assets (models and textures) from: https://github.com/SaschaWillems/Vulkan-Assets

  6. Extract the model and textures subdirectories and the assorted files to C:/dev/Vulkan-master/assets/

  7. Download the OLD GLM library from: https://github.com/g-truc/glm/tree/1ad55c5016339b83b7eec98c31007e0aee57d2bf

  8. Extract the contents of glm-1ad55c5016339b83b7eec98c31007e0aee57d2bf/glm subdirectory to C:/dev/Vulkan-master/external/glm

  9. Download and install the Intel Open Image Denoise library.

Building the executables

  1. Open the solution file C:/dev/Vulkan-master/vulkanExamples.sln

  2. Change build setting to Release mode, x64

  3. Select the Build -> Build Solution menu item (be patient, this takes a long time the first time)

  4. Run an example (e.g. C:/dev/Vulkan-master/bin/Release/raytracingreflections.exe)

Replacing the source files

  1. Copy VulkanglTFModel.cpp and VulkanglTFModel.h to C:/dev/Vulkan-master/base

  2. Copy closesthit.rchit, miss.rmiss, raygen.rgen and shadow.rmiss to C:/dev/Vulkan-master/shaders/glsl/raytracingreflections

  3. Copy raytracingreflections.cpp to C:/dev/Vulkan-master/examples/raytracingreflections

  4. Make directory C:/temp/rob_rau_cornell/gltf/

  5. Copy cornell.bin, cornell.gltf, ColorMapWithOpacityAlpha512.png and GlowMapWithReflectionAlpha512.png to C:/temp/rob_rau_cornell/gltf/

  6. Delete all projects from the solution, except for ALL_BUILD, base, raytracingreflections and ZERO_CHECK.

  7. Rebuild solution

  8. Make a batch file rtreflect.bat in C:/dev/Vulkan-master/bin/Release/ with the following contents:

glslc.exe "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\closesthit.rchit" --target-env=vulkan1.2 -o "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\closesthit.rchit.spv"
glslc.exe "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\miss.rmiss" --target-env=vulkan1.2 -o "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\miss.rmiss.spv"
glslc.exe "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\raygen.rgen" --target-env=vulkan1.2 -o "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\raygen.rgen.spv"
glslc.exe "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\shadow.rmiss" --target-env=vulkan1.2 -o "C:\dev\Vulkan-master\shaders\glsl\raytracingreflections\shadow.rmiss.spv"
raytracingreflections.exe

bidirectional_path_tracer's People

Contributors

sjhalayka avatar

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.