\

Real-time PathTracing with global illumination in WebGL

102 points - last Thursday at 6:35 PM

Source
  • viktorcode

    today at 8:29 PM

    So nice to see another person being that enthusiastic about ray tracing! I didn't do a comparable level of work in this field, but as a hobby this fascinates me a lot!

    One common misconception is that ray tracing is computationally prohibitive. It was, but no longer so; it's a target within our reach, especially so when there's GPU with hardware acceleration for ray casting.

    Many games use ray tracing for partial scene processing, and of course they all work in real time. My favourite example is Metro Exodus with ray traced global illumination, which works on last gen graphics hardware pretty well. Not all games use the technology efficiently, but the trend is already obvious: with accessible real time ray tracing rendering the scene will become a much easier task.

    P.S. I used "ray tracing" when more accurately I should have used "path tracing", but I prefer to use a single term to encompass the whole technology with all its variants.

    • Keyframe

      today at 10:15 PM

      nice historical recreations, but I can't believe there was no '1984' image from Thomas Porter there https://graphics.pixar.com/library/DistributedRayTracing/ind... (and I can definitely remember few more!)

      • ivanjermakov

        today at 9:10 PM

        I recently wrote one in WebGPU, too

        https://github.com/ivanjermakov/moonlight

        • ttul

          today at 6:42 PM

          Reminds me of the old POV-Ray stuff I did in the early-1990s. But... in realtime and in my browser. WTF!

          • pixelpoet

            today at 6:07 PM

            Pretty great demos, and they do indeed run well on my phone; I suspected it might be an AI thing because of the tautology in the title, but it seems hand written.

            Particularly cool is the recreation of that classic scene from Kajiya's rendering equation paper, with the glass spheres and caustics.

            • modeless

              today at 6:22 PM

              This is neat. In the demos I would suggest making mouse/finger drag orbit the camera around the scene instead of panning. Panning can be done by a 2D image transformation so it doesn't show off the 3D nature of the renderer.

                • dahart

                  today at 6:53 PM

                  I second the vote for orbit cam! Add double-click to choose the orbit point, and add a zoom control that is proportional to distance to orbit point, and it suddenly gets insanely easy to navigate the scene and find good views. It’s too hard to control using translate and look-around angles.

                  The demos I tried so far have translate and not pan, and those are fully 3d…

              • flowerbreeze

                today at 6:57 PM

                It's very interesting and I'm also impressed that most of the demoes run on my potato-phone.

                • pjmlp

                  today at 6:28 PM

                  Lots of cool demos.

                  • LoganDark

                    today at 7:34 PM

                    Huh. I've seen space/shift-or-ctrl, Z/X, and Q/E for up/down movement... but never Q/Z

                    • today at 7:01 PM

                        • today at 7:08 PM

                            • today at 7:10 PM

                      • mamma_mia

                        today at 8:31 PM

                        [dead]