-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Vulkan Ray Tracing? #27355
Comments
ray tracing later 4.1 or 4.2+ future (depends plan @reduz) |
Can ray tracing be implemented using Radeon Rays? |
Path tracing will (and is already) be happening in gaming. However it is still very new and not well clear which direction it is going.
So nothing is really hard to implement (even the de-noising papers are not that hard to understand) but the main problem is that AMD still has no dedicated hardware for ray-tracing and has not standardized a Vulkan API. So I think we should wait for this to happen, especially since maybe the API will change a lot when (if) it get standardized. Concerning the denoising, as long as you can access the N last frames' depth-buffer & normals buffer & Albedo buffer that's all you need (everything is done in image-space) |
Compute shader based solutions should work too. Crytek has a demo running 30 fps at 4k on Radeon Vega 56. |
woa that's a great achievement. Maybe we don't need dedicated hardware after all then. If AMD plans on never implementing a dedicated API then we could go that way. But it'd be a pity to implement everything ourself and 6 month later AMD standardizes an API in Vulkan similar to Nvidia's |
I'm really excited about ray tracing, but at the same time my opinion is that ray tracing in games is so new that we should wait until it's more standardized before the core team spends time on it. There are many other general improvements that could be made that are likely much more important. Obviously if someone else wants to implement it then that's another thing :) |
Why is it a problem, that AMD does not support it? The engine is for, and to be compliant with Vulkan, and not NVIDIA or AMD. |
As far as I understand, Vulkan has both prefixed non-standard vendor extensions and core standard specifications. So Nvidia's extension is not part of standard Vulkan, this is a non-standard extension to Vulkan. Vendor extensions can become core standard specifications once/if vendors eventually agree on the API (see this stackoverflow answer). This seems very much the same as the |
This might be also an idea to look into if we have path tracing : Ray-Traced Irradiance Fields . Basically instead of going full path-tracing for all the screen pixels, we could keep the classic GIProbe workflow, and only path-trace them. |
Something worth checking out: https://openimagedenoise.github.io/ . |
shouldn't denoising be possible using SVGF Denoising Filter, it produces amazing results with 1SPP, this blog post is a good way to get more information on it. |
I've just been in Radeon Rays land, and I can tell you its not pretty. RR 2.0 MIT-Licesnsed old version is broken (no working Vulkan back end and broken two level BVH). RR 3.0 is what you'd want, but its closed source (unless that changes when you get a commercial license) plus it has significant drawbacks of not offering programmable Intersection and an Any Hit routine (unless you get the source, but then whatever you modify/fix you can't distribute). The lack of Any Hit is a huge pain in the ass, because it makes Alpha-Tested geometry (light mapping for trees and foilage) as expensive as multiple mirror reflections, you basically have to stop the ray, load it up in compute, check the texture, write out the ray and start it again if alpha test fails. This is a PITA for even shadow and AO rays, as it will slow it down by unimaginable orders of magnitude, its like doing depth peeling for transparency. Intersection routine (shader) would be nice for analytical area lights (they would converge faster), but thats only a small speed up compared to Any Hit.
If you tried hard enough you could most probably cook up a compiler extension to glslang or shaderc that would compile the VK_NV_raytracing syntax Miss, Closest Hit, Any Hit, and Intersection shaders into a single compute shader that would run in a single dispatch (as opposed to 1 dispatch per ray-call-stack-level), it would need a scratch buffer for the ray queue and some special re-indexing of descriptors in its descriptor sets and either |
That's probably what they used to test the DXR fallback layer ;) |
Well, Vulkan has now announced ray tracing support (without a vendor extension). |
Right, and I think the thing in godot that might need the RT treatment the most right now would be shadows, but we'll see if someone emerges wanting to implement raytracing in some form for Godot 4.x or later. I'm sure it's just a matter of time though. |
Great discussion. As pointed out in one of the earlier comments, Ray Tracing in Godot will likely be targeted for 4.1 or 4.2. Right now the Vulkan raytracing extension is not well supported. Once it gains wider support and more hardware can take advantage of it, we will reevaluate. For now: The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
Will it be possible to implement ray tracing with the swap to the Vulkan renderer in Godot 4.0?
Nvidia Dev Blog
The text was updated successfully, but these errors were encountered: