a 4k exe-gfx released at Outline 2021



This entry started as a shower thought two days before the deadline: What if I wrote a path tracer but instead of starting the ray at the camera, I start tracing from the light source and put a point on the screen where the ray ends up?

This turned out to be fairly easy to implement in vertex shaders since they allow you to put points on the screen at given coordinates and also let you compute a lot of rays at once.


Here, you can see through both spheres because it puts a point on the screen, no matter whether the camera should be able to see that point or not.

Once I fixed that issue and gave it a lot more vertices and samples, I got this result:


I thought about calling it a day here, but if I was to release the renderer as-is, no one would be able to tell that this isn't just a plain old fragment shader path tracer, in which case there is no point in rendering it this way. I needed some trick to make it stand out more.

So instead of drawing a single point where the ray ends up, I start a line at that point and drag it towards x+ by the distance that a noise function gives me.

Add some mild post-processing on top of that and there you go!