-
Notifications
You must be signed in to change notification settings - Fork 477
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
Realtime Raytracing extensions #686
Comments
Not quite. Vulkan is a lower level API. The issue is whether vulkan supports the primitives required to implement raytracing. Indeed, it is important that this open platform remain competitive, and maintain feature parity with the plantation platform. |
Well, that's not hard. Even OpenGL has them in forever. I would say the decisive factor is whether any actual HW has accelerators specific only to raytracing. TMK, that is not so. The DXR whitepaper seems to admit it (https://blogs.msdn.microsoft.com/directx/2018/03/19/announcing-microsoft-directx-raytracing/):
That being said, Vulkan already has programmable graphics and compute engine. No extensions needed. |
Nvidia has dedicated tensor cores in the next generation volta cards specific for AI use, and they use them to accelerate realtime raytracing. |
https://en.wikipedia.org/wiki/Volta_(microarchitecture) :
Coincidentally, GLSL already supports |
While you can do raytracing with a normal graphics shader or compute shader, its awkward in places and driver/hardware specific extensions can greatly improve performance. I think it would make sense to add a VkRaytracePipeline with raytracing specific shaders (hit shader, miss shader, etc...), and queue support, coupled with a vkCmdRaytrace() function (as we have vkCmdDraw() for graphics pipeline and vkCmdDispatch for compute pipeline). Even if its not initially supported by any cards, having the spec/interface ready to go would be nice. |
Google "design by committee", and look for pros and cons of that approach. spoiler: Adding something by democratical process is a suboptimal thing to do.
You need to support that assertion with evidence. |
Well you have 4 posts with 16 slides for Nv proposed Vk_nv_raytracing shown at GTC here: |
@oscarbg If I understand it correctly the AMD seems to answer with a library-style solution: https://gpuopen.com/gdc-2018-presentation-real-time-ray-tracing-techniques-integration-existing-renderers/ Which, if my assumptions are correct, seems to be the superior alternative. I.e. assuming there is not special HW for that case (and that case only), then there is no reason to believe one or the other solution would be more efficient. BUT a library solution would work on all GPUs, and also not creep features into a normative API. PS: library have also bit more flexibility, e.g. can experiment with different accelleration structures. |
@krOoze similar to other question: well it depends.. DXR and Vulkan raytracing seem lowest level crossvendor APIs IHV want to agree support for.. (vulkan is in the works).. |
If hardware is going to get dedicated hardware support for raytracing which needs custom code to get leveraged thent he IHV will create an extension for it which other IHVs can adopt or adapt until there is a canonical EXT/KHR that may or may not be promoted down the road. Doing clean room speculation about how that extension should look like is foolish and is what leads to most designed by committee warts. |
@krOoze You won't be able to use mat4x4's, those are 16bit floats (and as you know vulkan just doesn't support those right now) and also an addition the result is 32 bits (not 16bits) and a 4x4 matrix addition takes place that is also 32bits. |
@Cazadorro I sit corrected. Nevertheless, that is a case for adding |
Here is the full GTC 2018 presentation on RTX integration: |
There is also a video of the presentation. |
@krOoze From the presentation above, it says NV has already proposed the extension to Khronos as a potential multivendor API for Vulkan. Did you refuse it because of the added pipeline types, or is the Vulkan WG planning to adopt it? ...Actually, I guess overall, there's not too much use speculating. Either @TomOlson (assigned to issue) & @Tobski et al are already aware and working on it, or Khronos will be late to the party. It seems NV will be aggressively pushing ray-tracing to graphics developers for the next several years. Many partners lined up, Microsoft woke up and announced DXR very quickly as a competitive response to a potential NV VK / GL extension, that flashy Epic demo that went viral, etc. It must be true that there will be a noticeable performance advantage to this extension w/HW support versus Nvidia OptiX or Radeon Rays. Otherwise they wouldn't do it. |
@leafi It is not my place to refuse anything. I am just a general public contributor, not a Khronos member. My issue with this is that it is not a low-level thing, and it has been done for years by other means. For me, the presentation lacks motivation to do this as layer0. Also lacks explanation why to use this specific accelleration structure until the end of time. Also I am not aware of HW units that would actually do this specifically -- it will probably just run on your usual general-purpose shader units. If there is something missing in Compute pipeline, that is the place that should be developed, rather than add artificially restricted new type of pipeline. |
@krOoze I tend to agree with you. Nvidia is achieving this via first using normal rasterization, then using raytracing from then on. In normal raytracing, you have to oversample to avoid noise artifacts caused by rays not hitting the same spot, this means between 2 to 8 rays per pixel are used. Nvidia solved this using a real time recurrent neural network on Pascal/Maxwell architecture, and also handles antiailiasing on raytracing with neural networks. Nvidia only managed to do this at 30fps 720p however with very highend cards at the time (and requires a lot of training) Nvidia today has been showcasing real time raytracing with volta, which has "Tensor Cores" which are 4x4x4 16 bit matrix multiply 32 bit add units, 1 4x4 for every 2 cuda cores. This was implemented to help with neural networks. Nvidia is using a neural network solution with special hardware to speed up raytracing. In addition they could be speeding up triangle intersection using the tensor cores, where because of the spatial segmentation structures that are necessary to make sure that you don't test every triangle, 16bit float precision would likely be enough to not have any position artifacts. All of this is highly "nvidia" and nvidia is investing in neural-networks on their own cards because it helps in both graphics and scientific/AI computing where they are trying to diversify economically. I wouldn't be surprised if in 1 to 2 years their set up is not the most efficient API for better methods of ray-tracing on future hardware/ algorithms |
So ummm... Turing was announced and RT-cores were unveiled. Where are we with this? Any plans on adoption soon? |
@krOoze I don't agree with you. |
NVIDIA is working on a vendor extension to expose RTX to Vulkan, which will be released soon. Here is an overview of what it will look like: |
Apologies on asking this here, but it is relevant: Are there any plans/efforts to add a raytracing extensions on OpenGL for HW RT support? Or is OpenGL in essence abandoned as far as new features are concerned? |
All the focus for raytracing extensions is on Vulkan at the moment. No comment on plans for OpenGL at this time. |
I would probably not get an answer but...
|
I understand your answer. |
My issues with VK_NV_raytacing are the binary?? black box nature of VkGeometryNV and the handling of code and data in the same Shader Binding Table that also currently looks like a binary black box. I also don't like how they just ignored SPIR-V. I think it would be wise to wait for a few other vendors to implement hardware raytracing to see how the inputs for those areas might differ. Also, in five to six years it may be that the special parts of these RTX cores will just become part of the regular compute cores. Since VkGeometryNV is passed to vkCmdBuildAccelerationStructureNV, I feel it would be better to make that a vkCmdBuildAccelerationStructureBeginNV/End with the drawing of triangles and the initial creation of rays being the contents. As I've pointed out there is no way of knowing what that would look like cross-vender. So add RTX to OpenGL, where the damage would be less noticeable, and keep Vulkan pristine PLEASE. |
Thanks for expressing your interest in realtime raytracing extensions in Vulkan. We have formed a Vulkan Ray Tracing subcommittee to explore how to expose ray tracing in Vulkan, and the topic is under active discussion. This is a high priority for some members, and we have received design contributions from several hardware vendors and are reviewing feature requirements from software developers as inputs to the standardization process. As always, our priorities for new technology in Vulkan are driven by input from the Vulkan developer community and the broader Vulkan ecosystem. -Daniel (Vulkan Ray Tracing Chair) |
I believe much of the headache of integrating raytracing into vulkan would be mitigated by adding support for recursion into glsl (which is supported already by the hardware), since raytracing is a fundamentally recursive process. From working with the current NVidia extension for Vulkan, I believe it is largely inelegant for this reason, and that things should shift to a more "compute" oriented pipeline that simply exposes built in hardware accelerated raytracing functionality into the shaders. The acceleration structure building part generally makes sense as one needs some means of adding triangle meshes into a scene (although instance data should shift to column major transforms to be more consistent with GLM/GLSL) However the process of linking multitudes of shader groups with obscure stage names.. miss shaders, hit shaders, intersection shaders and "general" shaders - this is clearly not the direction we want to be heading in. |
What is your (the committee's) stand on DirectML included in DirectX? Will (Are) Machine learning extensions also find (needed) their way in Vulkan? |
Has the committee come to any definitive decision on this? It's been almost a year now since it was formed to discuss this. Or where can I find any discussions or notes concerning progress? |
The last public update from the TSG was given at SIGGRAPH 2019. |
^ video: https://youtu.be/1fU4w2ZGxH4?t=1465 |
Pretty sure actually one could emulate NV_raytracing via plain old SM 6.0 compute to an extent, not the exact same API but functionally identical with descriptor indexing/bindless and a little bit of shuffling of external resource usage. I mean DXR Fallback is basically a bunch of HLSL 6.0 compute thrown together. Let me share my musings about improving Radeon Rays 3.0
GLM/GLSL ordering of matrix data is a mistake, especially for SSE/SIMD. |
Microsoft announced at GDC realtime raytracing for DirectX 12, Vulkan needs raytracing capabilities soon too for it to continue to stay relevant among developers.
The text was updated successfully, but these errors were encountered: