[osg-users] Nvidia RTX
Lionel Lagarde
lionel.lagarde at oktal-se.fr
Thu Feb 21 08:28:37 PST 2019
The RTX examples I found (like
https://iorange.github.io/p01/HappyTriangle.html) use a VK command
(similar to a compute dispatch) to trigger the ray tracing:
|void vkCmdTraceRaysNVX(VkCommandBuffer commandBuffer, VkBuffer
raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset,
VkBuffer missShaderBindingTableBuffer, VkDeviceSize
missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer
hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset,
VkDeviceSize hitShaderBindingStride, uint32_t width, uint32_t height); |
This function posts the ray tracing command to a VK command queue.
Finally, the main ray tracing shader "stores" the ray tracing result in
an image using imageStore.
I don't know about mixing an OpenGL context and the VK counterpart
(device, physical device, command queue, images...). It is maybe
possible but like the CUDA /GL interoperability, it may require
expansive synchronization mechanisms.
On 21/02/2019 15:19, Chris Hanson wrote:
> So, you'd need a shared GL/Vk context in order to Vk load the data and
> then GL trace it, if I understand correctly?
>
> We could probably bring VSG into play to load the data. I think
> there's enough working code there already to do so. Or, really, we
> could just us what VSG has already and compose and execute the RTX
> commands without OSG, but copying already-composed scene data over
> from the OSG side.
>
> On Thu, Feb 21, 2019 at 3:15 PM Lionel Lagarde
> <lionel.lagarde at oktal-se.fr <mailto:lionel.lagarde at oktal-se.fr>> wrote:
>
> Hi,
>
> It is a GLSL extension, the ray tracing functions use some input
> data (like the acceleration structure) that can only be
> constructed and uploaded using the vk API.
>
>
> On 21/02/2019 13:34, Chris Hanson wrote:
>> One of my guys pointed out this recent addition:
>>
>> https://github.com/KhronosGroup/GLSL/blob/master/extensions/nv/GLSL_NV_ray_tracing.txt
>>
>>
>> On Wed, Feb 20, 2019 at 9:47 PM Chris Hanson
>> <xenon at alphapixel.com <mailto:xenon at alphapixel.com>> wrote:
>>
>>
>> Well, I was wondering if there was an OpenGL RTX API
>> anywhere, but it doesn't seem there is.
>>
>> Vulkan would appear to be the way to go for the future, but
>> since that's not ready for the oven yet (don't even have all
>> the mise en place), it might be we just have to make a
>> utility library to shovel OSG data into OptiX and let it do
>> the work for now. There's always going to have to be some
>> kind of bridge from OSG to either Vulkan or something else if
>> no OpenGL support extension ever appears.
>>
>>
>>
>> --
>> Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
>> <mailto:Xenon at AlphaPixel.com> http://www.alphapixel.com/
>> Training • Consulting • Contracting
>> 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 •
>> OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
>> Legal/IP •Forensics •Imaging •UAVs • GIS • GPS •
>> osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded
>> • Mobile • iPhone/iPad/iOS • Android
>> @alphapixel <https://twitter.com/alphapixel>
>> facebook.com/alphapixel <http://facebook.com/alphapixel> (775)
>> 623-PIXL [7495]
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org <mailto:osg-users at lists.openscenegraph.org>
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> <mailto:osg-users at lists.openscenegraph.org>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
> http://www.alphapixel.com/
> Training • Consulting • Contracting
> 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 •
> OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
> Legal/IP •Forensics •Imaging •UAVs • GIS • GPS •
> osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded •
> Mobile • iPhone/iPad/iOS • Android
> @alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel
> <http://facebook.com/alphapixel> (775) 623-PIXL [7495]
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190221/2a177a0d/attachment.html>
More information about the osg-users
mailing list