Skip to content
0:00 / 0:00

#raytracing#pathtracing#unity

Coding Adventure: Ray Tracing

Sebastian Lague

1.4M subscribers • 11 videos on Hallway

YouTube

Beginner. No background in the topic needed.

1.5M views3 years ago1 recommendation

Graphics and audioRenderingC# and .NETGPUs, shaders and CUDA

Sebastian Lague explains how to build a custom ray and path tracing renderer using C#, HLSL, and Unity.

I tried creating a custom ray/path tracing renderer. Featuring: maths, shaders, and cats! This project was written in C# and HLSL, and uses the Unity game engine. Support my work (and get early access to new videos and source code) on Patreon or Nebula * Patreon: patreon.com/SebastianLague * Nebula: go.nebula.tv/sebastianlague Source Code: * GitHub: github.com/SebLague/Ray-Tracing/tree/Episode01 Credits and References: * raytracing.github.io * blog.demofox.org/2020/05/25/casual-shadertoy-path-tracing-1-… * Music: github.com/SebLague/Misc-Project-Info/blob/main/Coding-Adven… Chapters: Intro Cameras and Rays The Pixel Shader Drawing a Sphere Multiple Spheres, and Colour! Two Types of Reflections Experimenting with Randomness Random Hemisphere Directions The Trace Function Testing Lights Chair Thief Progressive Rendering A Simple Sky Lambert’s Cosine Law Cosine Weighted Rays Triangles Some Tests Specular Reflections Tomatoes and Glossiness Blur and Anti-Aliasing Depth of Field The End

Why it's here

1 person recommends this

What people say. Highly recommended as an exceptionally clear and engaging introduction to writing a ray tracer from scratch.

u/diplofocus_in r/GraphicsProgramming • Recommends

…/), which uses PBR, I decided it was time to actually understand how rendering works, so I set out to make my own renderer. I'm using Rust, with WGPU (https://wgpu.rs/), with WGSL for the shader. My main resource for getting up to this point was Filament (https://google.github.io/filament/Filament.html#materialsystem) and Sebastian Lague's video (link to this video My ray tracing is currently implemented directly in my fragment shader, with a quad to draw my textures to. I'm doing progressive rendering, with an arbitrary choice of 10 spp. With the current scene of a 100 spheres, the image converges fairly quickly (<1s) and interactions feel smooth enough (though I haven't added an FPS counter yet), b…