[HN Gopher] Web-Based Vulkan GLSL Ray Tracing Emulator
       ___________________________________________________________________
        
       Web-Based Vulkan GLSL Ray Tracing Emulator
        
       Author : yyycomposer
       Score  : 70 points
       Date   : 2021-12-08 13:08 UTC (9 hours ago)
        
 (HTM) web link (www.gsn-lib.org)
 (TXT) w3m dump (www.gsn-lib.org)
        
       | yyycomposer wrote:
       | The Vulkan GLSL Ray Tracing Emulator is an online application
       | that aims to simulate the ray tracing shader pipeline from the
       | Vulkan GL EXT ray tracing specification.
       | 
       | To this end, a pre-compiler is provided that translates the ray
       | tracing shader code into a classic WebGL GLSL fragment shader,
       | which generates a direct preview of the shader's output image in
       | the browser.
       | 
       | Most importantly, the emulator also allows exporting the ray
       | tracing shader code as a C++ Vulkan project that can fully
       | exploit the dedicated ray tracing acceleration hardware available
       | in recent graphics cards (such as Nvidia Geforce RTX GPUs or the
       | AMD RX 6000 series).
       | 
       | The web-based emulator is intended for computer graphics
       | education or rapid prototyping of GLSL ray tracing shaders. It
       | does not require a high-end GPU with special ray tracing
       | hardware. Only if you want to run the exported C++ Vulkan stand-
       | alone application, a GPU with ray tracing accelerator hardware is
       | necessary.
       | 
       | A tutorial is available here: https://www.gsn-
       | lib.org/docs/nodes/raytracing.php
       | 
       | This is a short demonstration of the project on YouTube:
       | https://www.youtube.com/watch?v=eMyqDNGkr0g
        
         | pjmlp wrote:
         | I love the approach, specially not having to deal with WGSL.
        
           | danielvaughn wrote:
           | I'm new to this space, but interested in graphics. What are
           | the differences and why do you prefer GLSL?
        
             | yyycomposer wrote:
             | Vulkan ray tracing typically uses GLSL as shader language.
             | DirectX Raytracing (DXR) uses HLSL (but is restricted to
             | run only on Windows).
             | 
             | Because Vulkan ray tracing is cross-platform, I have chosen
             | GLSL for this project.
             | 
             | https://github.com/KhronosGroup/GLSL/blob/master/extensions
             | /... https://www.khronos.org/blog/vulkan-ray-tracing-final-
             | specif...
             | 
             | WGSL is the shader language of WebGPU. But I believe WebGPU
             | does not support hardware ray tracing, yet.
        
             | pjmlp wrote:
             | Because even though I have my issues with GLSL and the way
             | Khronos manages the ecosystem, at least GLSL has a history
             | of an existing ecosystem that one can ping back into.
             | 
             | HLSL is the other big candidate, from DirectX, while Metal
             | uses a C++14 based dialect.
             | 
             | Meanwhile on game consoles the shading languages are
             | somehow flavours of either GLSL or HLSL.
             | 
             | WGSL, because of politics (Apple or whatever), is a mix of
             | C++, Rust and HLSL, with a non-existing ecosystem, where
             | they are still half way definig how the language is suppose
             | to actually look like.
        
           | yyycomposer wrote:
           | Thanks for your comment. I believe WebGPU does not (yet)
           | support accessing the ray tracing acceleration hardware. Or
           | does it? If yes, this would be great news to me!
        
             | pjmlp wrote:
             | I regularly read the meeting minutes, I think it won't even
             | be part of 1.0.
        
         | ArtWomb wrote:
         | >>> web-based emulator is intended for computer graphics
         | education
         | 
         | Vulkan ShaderToy in the browser! This is huge. ShaderToy is
         | used everywhere. And a LOT of people are struggling with
         | getting great ray tracing results.
         | 
         | Have you tried porting the NVPro samples?
         | 
         | https://github.com/nvpro-samples/build_all
        
           | yyycomposer wrote:
           | Currently, compared to Shadertoy, the website is not well
           | known. It would become more educational if more users shared
           | their ideas. Therefore, it is important to spread the word.
           | 
           | Not all samples from your link are applicable for ray
           | tracing, but I have tried to cover some basic ray tracing
           | examples in the tutorial: https://www.gsn-
           | lib.org/docs/nodes/raytracing.php
        
         | billconan wrote:
         | I really like the little diagram showing the states and how it
         | is linked to the source code.
        
         | snovv_crash wrote:
         | Any plans to support a C++ version that has GLSL fallback
         | capabilities if the hardware doesn't support raytracing?
        
       | [deleted]
        
       | anonymousDan wrote:
       | Off topic but as someone trying to get into GPU architecture with
       | minimal graphics programming experience, can anyone recommend
       | good resources for understanding the terminology related to a
       | typical graphics processing pipeline (e.g. shaders, textures
       | etc)?
        
         | rp1 wrote:
         | https://learnopengl.com/Getting-started/Shaders
        
       ___________________________________________________________________
       (page generated 2021-12-08 23:03 UTC)