Coder Social home page Coder Social logo

klaywittler / project5-directx-procedural-raytracing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cis565-fall-2019/project5-directx-procedural-raytracing

0.0 1.0 0.0 11.5 MB

CIS 565 - DXR Project

C++ 85.57% C 6.86% HLSL 7.52% Batchfile 0.06%

project5-directx-procedural-raytracing's Introduction

DirectX Procedural Raytracing

University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 5 - DirectX Procedural Raytracing

  • Klayton Wittler
  • Tested on: Windows 10 Pro, i7-7700K @ 4.20GHz 16.0GB, GTX 1070 8.192GB (my PC)

Sections

Note: Banded artifacts are a result of the recording not the rendering process.

Introduction

This project implents real time ray tracing with the DXR API.

Ray tracing works by shooting rays at each pixel from the camera into the scene. On collision, the recursion depth is incremented and the rays go towards the light to color the object. If the ray hits another object, it is marked as a shadow ray. If a ray collides with any reflecting material it sends off another ray but also changes the original ray according to Snell's Law as long as the recursion depth as not been reached.

Below is the graphical representation of this pipeline.

In order to speed up intersection tests, and acceleration structure is used to define rules for the ray in traversing geometry.

Each instance in the top level is a realization of a particular geometry in the bottom level. The geometry in the bottom level contains simple equations for intersection tests based on the particular geometry. The top level instance can be translated, scaled, and rotated to created various objects around the scene that appear different. However, if a ray enters the AABB the ray is transformed into the original bottom level structure and then can perform a simple intersection test according to the geomtrical equation.

Performance Analaysis

Below the impact of increasing the recursion depth of ray bounces on frame rate can be seen. The higher the frame rate the better and it can be seen that 3 is the optimal depth in terms of frame rate. The depth cannot be lower than 3 in order to capture reflectance and shadow rays.

In the sample images below, it can also be seen that the additional depth increases the sharpness of the image marginally but not enough to justify the frame rate drop.

Recursion Depth Image
3
7
9

Bloopers

Incident Light Ray Metaball Potentials
  • Incident Light Ray: reversed the direction of the light rays in the Phong and Fresnel lighting equations.
  • Metaball Potentials: incorrectly accounted for the ratio into the metaball in calculating the potential

project5-directx-procedural-raytracing's People

Contributors

klaywittler avatar shehzan10 avatar ziedbha avatar

Watchers

 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.