Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ray Tracing extension #535

Open
maierfelix opened this issue Jan 6, 2020 · 52 comments
Open

Ray Tracing extension #535

maierfelix opened this issue Jan 6, 2020 · 52 comments
Labels
api WebGPU API large question wgsl WebGPU Shading Language Issues
Milestone

Comments

@maierfelix
Copy link

maierfelix commented Jan 6, 2020

I've made a Ray-tracing implementation for the D3D12 (using DXR) and Vulkan (using VK_KHR_ray_tracing) backend of Dawn.

To demonstrate usage:

Link to specification here.

@maierfelix maierfelix changed the title Ray-Tracing Ray-Tracing extension Jan 6, 2020
@Kangz
Copy link
Contributor

Kangz commented Jan 6, 2020

See #477 which is almost a duplicate of this issue.

The work is nice and shows will be a good reference if/when we add ray-tracing to WebGPU but as mentioned in the other issue we don't have enough perspective on this technology yet to be able to add it to WebGPU. Also I don't see us looking at this space in the medium term because there's already so much to do for basic functionality :)

@litherum
Copy link
Contributor

litherum commented Jan 6, 2020

Adding ray tracing to the web platform in a way it can be implemented using Metal Performance Shaders, D3D12 ray tracing, and Vulkan ray tracing, seems like a valuable thing to do.

I agree with @Kangz about priorities. If someone wants to do the work for us, I’m sure we’d be willing to accept it, but short of that, the WebGPU team on WebKit (at least) is busy with the existing WebGPU spec and functionality. I do expect we’ll get there one day eventually, though.

@magcius
Copy link

magcius commented Jan 6, 2020

Note that not many desktop titles have added support for VKRay nor DXR yet. It remains to be seen whether it will see large-scale adoption. DXR 1.1 is a recent upgrade to the DXR API which makes it (in my opinion) a lot more palatable for developers. Not sure if equivalent functionality exists in VKRay.

https://devblogs.microsoft.com/directx/dxr-1-1/

@kvark
Copy link
Contributor

kvark commented Jan 8, 2020

@maierfelix the steps to proceed here would be:

  1. identify the need - ✅ (as an extension, can't be in core)
  2. investigate the differences in native APIs
  3. propose the API in WebIDL spec, discuss with the group to make it accepted
  4. implement (:white_check_mark: for Dawn)
  5. write tests in the CTS (for TDD folks, you can re-order with 4)

@maierfelix
Copy link
Author

maierfelix commented Jan 8, 2020

@kvark thanks for the direction, but could you elaborate about number 2?

Edit: Do you mean the different render backends?

@Kangz
Copy link
Contributor

Kangz commented Jan 8, 2020

  1. means investigating and comparing how ray tracing is done in D3D12, Metal and Vulkan. See issues tagged with "investigation". This is to inform step 3) and come up with a portable API.

@litherum
Copy link
Contributor

Vulkan does this with VK_NV_ray_Tracing. D3D12 does this with DXR. Metal does this with Metal Performance Shaders.

@pjoe
Copy link
Contributor

pjoe commented Mar 10, 2020

I think it would be a major win for WebGPU to include ray tracing support (optional based on hw support), or in the very least have it on the near term road-map.

Would love to avoid the 'mistake' of WebGL 2, which mostly matched GLES 3, while GLES 3.2 added all the fun stuff (geometry, tessalation and compute shaders). This really made WebGL 2 seem as a very disappointing update when it came out (I know it still has lots of good stuff compared to WebGL 1 - but still) :S

@maierfelix
Copy link
Author

For your interest, I've added a specification of the RT draft here.

DirectX and Vulkan Ray Tracing are very similar in their style and usage.

  • DXR seems to have the most features and control
  • Vulkan's API is similar to NVIDIA Optix (and there is a new cross-vendor extension in progress, page 29). Interesting here is also "Aiming for substantial compatibility with DirectX Ray Tracing (DXR)"
  • Metal seems to be different to the other APIs

My current concerns are:

  • The validations layers of VK_NV_ray_tracing are sloppy
  • At least with Vulkan, it's pretty easy to crash the entire driver when making a mistake - I'm positive that DXR has similar flaws
  • Metal could too different to the others (no hardware acceleration for ray intersection, no RT shaders, ..)

@yyc-git
Copy link

yyc-git commented Mar 15, 2020

Hello! I am Web 3D engine developer!

Very Thanks for the work of @maierfelix !
I'm very interesting for ray tracing in WebGPU, and your work is amazing!

I wish WebGPU to support Ray-Tracing extension as soon as possible!

Thanks for @maierfelix and WebGPU!!!

@pjoe
Copy link
Contributor

pjoe commented Mar 17, 2020

Seems like there now is standard vulkan ray tracing extension: https://www.khronos.org/news/press/khronos-group-releases-vulkan-ray-tracing

VK_KHR_ray_tracing (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_ray_tracing)

@maierfelix
Copy link
Author

I've made an example of the VK_KHR_ray_tracing extension here, which I'll use as a base to port the current VK_NV_ray_tracing implementation in Dawn.

Currently I'm mainly waiting for bug fixes related to the current NVIDIA driver, the validation layers don't support the new extension and it's not possible to build AS on the host yet.

The new extension indeed offers the same features as DXR, though most of them are not implemented in the drivers yet.

Regarding Metal and OpenGL:
Since the new RT shaders are similar to compute shaders, it might be possible to emulate them and give a unified interface to the RT stuff in WGSL.

@yyc-git
Copy link

yyc-git commented Mar 25, 2020

@maierfelix Great work! Thank you very much! I wish node webgpu could support the new extension~

@maierfelix
Copy link
Author

@yyc-git The RT fork now uses VK_KHR_ray_tracing and is also included in the latest version of node-webgpu. If you want to try it, make sure you have the Vulkan beta driver installed.

@yyc-git
Copy link

yyc-git commented May 4, 2020

@magcius Great work! Thank you very much~

@lin7sh
Copy link

lin7sh commented May 14, 2020

Great work, using the official KHR extension is a way going forward.

After the new Metal4(possibly) releases next month WWDC, I hope someone who familiar with Apple MPS raytracing to contribute to the metal backend, or give some advices to shape the spec to make the metal implementation more straightforward.

@maierfelix
Copy link
Author

The RT fork now supports Ray tracing through the D3D12 backend. VK_KHR_ray_tracing and DXR are almost identical APIs, except 2 small differences I've found so far. DXR requires the maximum ray payload size and maximum hit attribute size defined during the pipeline creation. In VK_KHR_ray_tracing this is not necessary, but possible to define too.

@warvstar
Copy link

warvstar commented Jul 7, 2020

Just want to say, I think adding raytracing makes sense, it seems to be the way forward with graphics. AMD, NVIDIA and INTEL are all adding hardware support for raytracing, with much of it been available this year. There are even fallback layers for older hardware / some current gen.

Also Apple's Metal now has a raytracing API
http://metalkit.org/2020/07/03/wwdc20-whats-new-in-metal.html

I can only speculate but I imagine mobile RT hardware for Android will become a thing here soon too, there are some companies working on RT hardware for Android, such as Imagination Technologies. I believe Samsung's new Arm SoC designs are using AMD new RDNA2 and I'd be really surprised if they omitted support for VKR/RT.

@maierfelix Thanks for working on this!

@ElaraFX
Copy link

ElaraFX commented Nov 10, 2020

Making this official will be valuable to enable real-time high-quality visualization for web-based applications.

@kainino0x
Copy link
Contributor

kainino0x commented Nov 10, 2020

Please note: shipping ray-tracing is not going to be a priority for the group until well after 1.0 has shipped and bugs have been ironed out, because it is a feature which is only available to a small fraction of users with recent high end machines.

@kvark
Copy link
Contributor

kvark commented Nov 12, 2020

For the record, I think it's totally fine for a sub-group to form that would develop this part of the API as an extension, as long as it doesn't distract the main group from moving forward. I'd be happy to participate, knowing that there is a lot of demand for RT!

@litherum
Copy link
Contributor

I’m interested in working on ray tracing too

@magcius
Copy link

magcius commented Nov 12, 2020

Metal-style and DXR-style raytracing are such different beasts that it will be extremely difficult to see a convergence any time soon. Not to mention that DXR has two different versions, 1.0 and 1.1, but VKray is roughly equivalent to DXR 1.0.

There's far too much divergence in the space to make a long-lasting web standard, in my opinion. DXR has still not seen large-scale adoption, and game developers are still skeptical of the promises made by DXR 1.0 and 1.1. Namely, there's still a lot of questionable "performance portability" and best practices, especially given the lack of ray sorting.

@pjoe
Copy link
Contributor

pjoe commented Nov 12, 2020

I suppose another issue to figure out would be de-noising. Seems like with current hardware, this is really needed to reach a good framerate (with decent quality). You could probably just let that be up to the application, but would be easier if there was some support for this available directly.

@maierfelix
Copy link
Author

For the record, I think it's totally fine for a sub-group to form that would develop this part of the API as an extension, as long as it doesn't distract the main group from moving forward. I'd be happy to participate, knowing that there is a lot of demand for RT!

Happy to hear that!

Metal-style and DXR-style raytracing are such different beasts that it will be extremely difficult to see a convergence any time soon. Not to mention that DXR has two different versions, 1.0 and 1.1, but VKray is roughly equivalent to DXR 1.0.

The current beta extension VK_KHR_ray_tracing targets at matching DXR's functionality, there are quite a few new features in the recent releases of both APIs but most features are not that relevant to essentially work with ray tracing (Ray queries for example). The approach of adding ray tracing as a separate pipeline (just like a compute pipeline) is in my opinion the best choice here, and is in fact how I designed the API in my Dawn RT fork and what is also the initial design of VK_NV_ray_tracing.

Metal is indeed a problem as it doesn't follow the principles of the other APIs. I'm afraid that if this issue is tackled, Metal as the weakest unit in this regard either limits the way of how DXR/VK_KHR_ray_tracing can be used too much, or even becomes a full blocker.

There's far too much divergence in the space to make a long-lasting web standard, in my opinion. DXR has still not seen large-scale adoption, and game developers are still skeptical of the promises made by DXR 1.0 and 1.1. Namely, there's still a lot of questionable "performance portability" and best practices, especially given the lack of ray sorting.

I have seen a very different picture here. There are many people looking forward to working with RT hardware and the people that do are often surprised of how fast it is. A remarkable part of people lacks the motivation to go through the hassle of dealing with these low-level APIs in order to work with hardware RT. This is where I see WebGPU filling this gap. I built numerous projects with the RT fork and it was super fun and you get nice results within hours instead of weeks or months.

Regarding performance, the current issue is the lack of a broad documentation, best practice documents being sparely and just typical issues that rise with new stuff, I don't see this too much as a problem. Also ray sorting is a general problem in ray tracing along many others.

I suppose another issue to figure out would be de-noising. Seems like with current hardware, this is really needed to reach a good framerate (with decent quality). You could probably just let that be up to the application, but would be easier if there was some support for this available directly.

Implementing a denoiser should be up to the user, denoisers are too specialized and too much tied to an application and also too much of a research field.

@m-schuetz
Copy link

m-schuetz commented Nov 13, 2020

There's far too much divergence in the space to make a long-lasting web standard, in my opinion. DXR has still not seen large-scale adoption, and game developers are still skeptical of the promises made by DXR 1.0 and 1.1. Namely, there's still a lot of questionable "performance portability" and best practices, especially given the lack of ray sorting.

I have seen a very different picture here. There are many people looking forward to working with RT hardware and the people that do are often surprised of how fast it is.

I agree, I'd love to use ray tracing on the web. I think web browsers would be a great way to pioneer (as in popularize through widespread use and demos) this relatively new feature through an extension. People did amazing stuff just with fragment shaders in shader toy, perhabs we'd also get so see amazing things done with ray tracing in a similarly easy to use platform. E.g. using compute to generate procedural models and scenes, and ray tracing to render them.

@pjoe
Copy link
Contributor

pjoe commented Nov 13, 2020

Re: denoising: yeah, maybe best handled by libraries. Just thinking about new users wanting to play with ray tracing, and perhaps being a bit disappointed by quality/performance. So if denoising library(ies) were available to easily plug in to your app, that could be a nice solution. Anyway can be handled outside the scope of a main RT extension.

@Kangz
Copy link
Contributor

Kangz commented Nov 13, 2020

Just to echo what @kvark said, ray tracing is exciting and all, but the focus should be on making a first version of WebGPU available. Without that first version there can be no ray tracing extension and we shouldn't slow down development of core WebGPU for experimental ray-tracing work.

(also I have concerns that it might be too early to investigate ray-tracing because that space isn't super mature in native yet)

@pjoe
Copy link
Contributor

pjoe commented Nov 16, 2020

@yyc-git that looks really cool, 加油

@yyc-git
Copy link

yyc-git commented Nov 16, 2020

@yyc-git thanks for sharing your results. I see you also experimented with BMFR denoising in one of your projects, quite interesting!

Yes, I have implement BMFR denoising based on your WebGPU Node project and BMFR's code in my real-time hybrid ray tracing demo. The detail is here: WebGPU+光线追踪Ray Tracing 开发三个月总结

But still my BMFR denoising has some defects, e.g. the specular highlight denoised result is not smooth!

@pjoe Thanks~

@pjoe
Copy link
Contributor

pjoe commented Nov 17, 2020

I've taken the liberty of creating a matrix room for further discussion: https://app.element.io/#/room/#webgpu-ray-tracing:matrix.org

@yyc-git Great writeup on zhihu.com, though had to use google translate (我的中文不好)

@yyc-git
Copy link

yyc-git commented Nov 17, 2020

@pjoe Thanks for your room~

@Kangz Kangz added this to the post-V1 milestone Sep 2, 2021
@expenses
Copy link

I've made some progress implementing ray-tracing support into wgpu: gfx-rs/wgpu#3020.

You can see what APIs I've added here: https://github.com/gfx-rs/wgpu/pull/3020/files#diff-797d05eb01678dbe95794b18b0271e468af2cf1e5df45031f08289a157940c12

I haven't used ray-tracing extensively so I'm not 100% sure on what we should be exposing. A notable difference to the API that @maierfelix created is that:

  1. With the WIP wgpu API you have to manage scratch buffers.
  2. I'm using VK_KHR_ray_query to avoid having to create an API for ray-tracing pipelines and shader binding tables

I'd love to be able to collaborate and see what makes the most sense for a generic API over both DXR and Vulkan RT!

@maierfelix
Copy link
Author

Nice work!

If I remember correctly, when starting with VK_NV_ray_tracing I've decided to make scratch buffer allocation API-managed since manipulating the scratch buffer memory in any way (including freeing) resulted in unpredictable driver behaviour, which would have been too insecure to allow in a browser. I like the idea though and limiting the user in the possible interactions with the scratch memory (e.g. preventing to bind the scratch buffer to a BindGroup) would allow more control over memory, while lowering this potential security hole.

I've never really looked into the query-based RT APIs, but to me it looks like this would make the emulation of VKR/DXR in Metal much harder or up to impossible. Please correct me if I'm wrong on this.

An uncertain but very important question is still how APIs without hardware RT support (such as Metal) should be tackled. Questions like if the RT extension should simply be unavailable on these machines, or if there should be some kind of emulation. Personally I'd vote against emulation, since such emulation could result in heavy limitations for the hardware APIs and make the general implementation a lot more complicated. This would require to emulate the RT implementations of GPU vendors on driver-level, which I think is a tremendous task, especially when formalising a standard.

Also as previous people mentioned in this issue, collecting the API differences between VKR and DXR would be incredibly useful in formalising a proper API proposal and determining the overall scope of such an extension.

@expenses
Copy link

expenses commented Sep 13, 2022

I like the idea though and limiting the user in the possible interactions with the scratch memory (e.g. preventing to bind the scratch buffer to a BindGroup) would allow more control over memory, while lowering this potential security hole.

I didn't think about security at all with the code I've written so far. Currently I've added 3 new buffer uses:

 const BUFFER_DEVICE_ADDRESS = 1 << 10;
 const BOTTOM_LEVEL_ACCELERATION_STRUCTURE_INPUT = 1 << 11;
 const TOP_LEVEL_ACCELERATION_STRUCTURE_INPUT = 1 << 12;

With the scratch buffer requiring STORAGE_READ_WRITE and BUFFER_DEVICE_ADDRESS. I think I could add a new ACCELERATION_STRUCTURE_SCRATCH_BUFFER buffer usage, remove BUFFER_DEVICE_ADDRESS and have all of ACCELERATION_STRUCTURE_SCRATCH_BUFFER, BOTTOM_LEVEL_ACCELERATION_STRUCTURE_INPUT and TOP_LEVEL_ACCELERATION_STRUCTURE_INPUT imply buffer device address in Vulkan. That would allow us to limit where ACCELERATION_STRUCTURE_SCRATCH_BUFFER can be used and hides some unnecessary parts of the API at the same time.

I'll do this in the PR soon.

As far as Metal goes.. it sounds like it'd be hard to unify their ray tracing API with Vulkan RT/DXR no matter what we do. But I'm happy to hear otherwise from people more experienced with it.

@Kangz
Copy link
Contributor

Kangz commented Sep 14, 2022

Very nice getting some ray-tracing in WGPU! (even if it is a draft PR)

I'm not super knowledgeable about ray-tracing but the wgpu PR seems to only add the ability to create the acceleration structures and perform ray queries in the shader. But my understanding is that to make ray-tracing scale to full-featured engines, you need to be able to dispatch a shader depending on the triangle that's hit / not hit etc. Which requires shader tables and a lot more complexity.

In general to standardize features we do a fairly detailed investigation of the feature in all three APIs (D3D12, Metal, Vulkan) and shading languages, highlighting common points and differences. Then we find some design that would work on all of them and start from there. In this case it seems Metal only has a performance shader that does ray-intersection against an accelerator structure and that's it? It might be difficult to merge all APIs. (but maybe possible by combining with other Metal features to do bindless shader selection, not sure). Expect standardization of ray-tracing to be a very long process though (and a process that can only start after v1 so as to not distract the group). It may be possible and useful to prototype experimental extensions in wgpu or Dawn before that though.

@MatusT
Copy link

MatusT commented Sep 15, 2022

In this case it seems Metal only has a performance shader that does ray-intersection against an accelerator structure and that's it?

Apparently, Metal added proper full ray tracing API according to: https://twitter.com/gavkar/status/1275673056845991937.
But i can't really find proper full documentation besides WWDC videos and samples.

@expenses
Copy link

But my understanding is that to make ray-tracing scale to full-featured engines, you need to be able to dispatch a shader depending on the triangle that's hit / not hit etc. Which requires shader tables and a lot more complexity.

I haven't looked into it much, but I think that ray queries should suffice for things like ray-traced shadows and reflections. GPU path tracers that do things like tracing more complex objects/proceural objects such as spheres will probably want the full pipeline though.

For performance info on a ray-tracing pipeline vs ray queries see https://tellusim.com/rt-perf/.

  • AMD is showing a 65% difference between ray query and ray tracing pipeline. The choice for AMD is obvious.
  • It’s better to use ray tracing than ray query for Nvidia, but the difference is only 3%.

@expenses
Copy link

For performance info on a ray-tracing pipeline vs ray queries see https://tellusim.com/rt-perf/.

Another takeaway from this document is that a custom implementation on Metal is slightly faster than the native metal code! So if we wanted to, we could skip the Metal intefaces for acceleration structures and build our own BVH on the GPU:

A naive compute shader ray query mode will use our generic GPU BVH builder with a single triangle per leaf partitioning. Each BVH node consumes 12 bytes. The whole model requires a 45 MB BVH buffer. For rasterization, this model requires 13 MB for 32-byte vertex and 32-bit index buffer.

Still, I think it's worth looking into metal ray tracing. I'm happy to sacrifice a bit of acceleration structure build performance if it means we get native metal support, but I'm not willing to sacrifice Vulkan/DX12 trace performance.

@magcius
Copy link

magcius commented Sep 15, 2022

The tellusim rt-perf benchmark is difficult to talk about without source code behind it, because many of these RT APIs have large pitfalls where you can fall off the performance fast path easily, in subtle ways, especially because of fundamental vendor differences. You could interpret it as some "average" app coded in maybe obvious ways with these ray-tracing APIs, though I suspect the variance would be meaningfully large, and it's hard to know where in the ranges these results sit.

@litherum
Copy link
Contributor

Metal's ray tracing API is a first-class citizen in Metal: https://developer.apple.com/documentation/metalperformanceshaders/metal_for_accelerating_ray_tracing?language=objc

We have custom intersection shaders that can perform ray-triangle intersection (e.g. for things like alpha-tested geometry) and ray-AABB intersection (e.g. for procedural 3D geometry).

As @Kangz described above, there is a relationship between the items in the acceleration structure and which intersection shaders get run.

The intersection shaders rely on bindless workflows. The author can attach a small number (compared to the total number of resources) of argument buffers to the intersection shaders. These argument buffers essentially act as the root(s) of a tree where the leaves point to all the resources which could be used by the intersection shader. The code within the shader is responsible for navigating this tree.

If WebGPU created a ray tracing extension, it should definitely be implementable on top of Metal's ray tracing facilities.

@litherum
Copy link
Contributor

litherum commented Sep 15, 2022

Another comment: right now the set of addressable resources in a WebGPU draw/dispatch is not enough to support ray tracing, as the ray could travel anywhere in the whole scene.

Before WebGPU supports ray tracing, we need to solve this problem (presumably by shipping a bindless extension).

@codedhead
Copy link

Hi everyone, really great to see here the interests in WebGPU ray tracing! I just open sourced my project WebRTX (https://github.com/codedhead/webrtx) which extends WebGPU API with ray tracing capabilities. The interface is mostly based on @maierfelix 's dawn ray tracing spec but it's software ray tracing. Basically I have implemented compute shader code that does the BVH traversal and Shader Binding Table based user shader function invocation etc., and this code is combined with user provided GLSL ray tracing shaders into one final mega compute shader. I have a website https://shadowray.gl for the demo. The project was done almost two years ago, hopefully I will have some time to work on it again.

@yyc-git
Copy link

yyc-git commented Apr 7, 2023

Hi everyone, really great to see here the interests in WebGPU ray tracing! I just open sourced my project WebRTX (https://github.com/codedhead/webrtx) which extends WebGPU API with ray tracing capabilities. The interface is mostly based on @maierfelix 's dawn ray tracing spec but it's software ray tracing. Basically I have implemented compute shader code that does the BVH traversal and Shader Binding Table based user shader function invocation etc., and this code is combined with user provided GLSL ray tracing shaders into one final mega compute shader. I have a website https://shadowray.gl for the demo. The project was done almost two years ago, hopefully I will have some time to work on it again.

Well Done! Good Job! So now we can use ray tracing pipeline with WebGPU in Chrome browser based on your webrtx project, and in the fureture the same code can run on hardware RTX when WebGPU support rtx ray tracing pipeline!

Thanks for your contribution!

@codedhead
Copy link

So now we can use ray tracing pipeline with WebGPU in Chrome browser based on your webrtx project, and in the fureture the same code can run on hardware RTX when WebGPU support rtx ray tracing pipeline!

Thanks! Yes exactly, I started the project as a polyfill implementation for the potential WebGPU ray tracing extension. Although the implementation is far from complete in the current state.

@maierfelix
Copy link
Author

@codedhead really nice work!

@JijaProGamer
Copy link

Bump. Im making a game engine on the web using WebGPU, and while it certanly runs, its not even close to fast. Adding this Ray-Tracing extension will make AABB and Triangle tests much faster, making my engine actually runnable.

@kainino0x
Copy link
Contributor

Hardware ray tracing will not be available in WebGPU for a good while, I'd say no less than 1-2 years unfortunately. If you'd like your engine to work well sooner than that, you'll need to find ways to use what's available now or is already in development.

@kainino0x kainino0x added wgsl WebGPU Shading Language Issues api WebGPU API labels Apr 30, 2024
@Axiverse
Copy link

I think that the presence of ray tracing is inevitable at this point with Apple support in modern iPhones and iPads and Qualcomm, MediaTek, and Samsung adding ray tracing support in their devices as well in addition to desktop GPUs. While we acknowledge that the availability of this feature set is likely not likely to be present in public WebGPU apis for some time, I do believe that it is well established for the draft spec work to be started and investigations begun. I (and others here) are willing to some of the investigation, API and hardware comparison, and other required lead work if given guidance on the considerations needed.

Please advise on the work needed to make some progress in this area.

Thanks.

@Kangz
Copy link
Contributor

Kangz commented May 20, 2024

Adding such a large feature to WebGPU will take considerable time, especially since to be useful ray-tracing needs bindless resources, which are just as complex a feature (if not more). That said we could start discussions if other members of the group are ok spending some of this group's time on it (it could be boxed to its own set of label, discussions etc so it doesn't derail WebGPU Milestone1/2 discussions).

What you'd need to start is a comprehensive investigation of what the various APIs add for ray-tracing, what the similarities are and what the differences are, and ideally how developers expect to want to code against this extension. Then some iteration cycles between proposals and implementation experience, to finally get to something that's agreed upon. It will take a lot of time and effort.

@kdashg kdashg changed the title Ray-Tracing extension Ray Tracing extension May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api WebGPU API large question wgsl WebGPU Shading Language Issues
Projects
None yet
Development

No branches or pull requests