Giter Site home page Giter Site logo

boybaykiller / opentk-pathtracer Goto Github PK

View Code? Open in Web Editor NEW
90.0 4.0 13.0 80.38 MB

C# OpenGL Path Tracer, Real-Time GPU accelerated

Home Page: https://youtu.be/XcIToi0fh5c

C# 73.60% GLSL 26.40%
opentk path-tracing raytracing opengl glsl compute-shader csharp

opentk-pathtracer's Introduction

C# OpenGL OpenTK Path Tracer

I am presenting a noisy, yet fully Path Traced renderer written in C#.

The calculations and rendering are done in real time using OpenGL.
I upload the whole Scene to a UBO which is then accessed in a Compute Shader where all the Path Tracing happens. Due to the realistic nature of Path Tracers various effects like Soft Shadows, Reflections or Ambient Occlusion emerge automatically without explicitly adding code for any of these effects like you would have to do in a traditional rasterizer.

The renderer also features Depth of Field, which can be controlled with two variables at runtime through ImGui. FocalLength is the distance an object appears in focus. ApertureDiameter controlls how strongly objects out of focus are blured.

If a ray does not hit any object the color is retrieved from a cubemap which can either be 6 images inside the Res folder or a precomputed skybox. The atmospheric scattering in this skybox gets calculated in yet an other Compute Shader at startup.

Screenshots taken via the screenshot feature are saved in the local execution folder Screenshots.

Also see https://youtu.be/XcIToi0fh5c.


Controls

KeyBoard:

  • W, A, S, D => Movment
  • E => Toggle cursor visibility
  • R => Reset scene
  • V => Toggle VSync
  • F11 => Toggle fullscreen
  • LShift => Faster movment speed
  • LControl => Slower movment speed
  • Esc => Close

Mouse:

  • LButton => Select object if cursor is visible

Render Samples

img1

img2

img3

opentk-pathtracer's People

Contributors

boybaykiller 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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