3 ms·
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 specifica
by yyycomposer 5y ago
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 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 https://www.youtube.com/watch?v=eMyqDNGkr0g
- pjmlp 5y agoI love the approach, specially not having to deal with WGSL.
- yyycomposer 5y agoThanks 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 5y agoI regularly read the meeting minutes, I think it won't even be part of 1.0.
- danielvaughn 5y agoI'm new to this space, but interested in graphics. What are the differences and why do you prefer GLSL?
- yyycomposer 5y agoVulkan 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/ext/GLSL_EXT_ray_tracing.txt https://github.com/KhronosGroup/GLSL/blob/master/extensions/... https://www.khronos.org/blog/vulkan-ray-tracing-final-specification-release 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 5y agoBecause 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.
- ArtWomb 5y ago>>> 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 https://github.com/nvpro-samples/build_all
- yyycomposer 5y agoCurrently, 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 https://www.gsn-lib.org/docs/nodes/raytracing.php
- billconan 5y agoI really like the little diagram showing the states and how it is linked to the source code.
- snovv_crash 5y agoAny plans to support a C++ version that has GLSL fallback capabilities if the hardware doesn't support raytracing?