Web-Based Vulkan GLSL Ray Tracing Emulator
gsn-lib.org
gsn-lib.org
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
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.
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.
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?
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