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

Is it possible to use inline raytracing? #83

Open
ohmaya opened this issue Mar 28, 2023 · 1 comment
Open

Is it possible to use inline raytracing? #83

ohmaya opened this issue Mar 28, 2023 · 1 comment

Comments

@ohmaya
Copy link

ohmaya commented Mar 28, 2023

o3de/o3de#14307

@siliconvoodoo
Copy link
Contributor

It should be possible by changing the shader model version in the .shader file
set it to type RayTracing.

example here
https://github.com/o3de/o3de-atom-sampleviewer/blob/64499f0e2ec324e656ea2f9bfef17c83942c8399/Shaders/RHI/RayTracingClosestHitSolid.shader

It will translate to lib_6_3 profile for DX12 platform:
https://github.com/o3de/o3de/blob/e282c39b6910a7f386179beefc77d7edd9e23c38/Gems/Atom/RHI/DX12/Code/Source/RHI.Builders/ShaderPlatformInterface.cpp#L235

With that, normally you should have access to RayQuery and TraceRayInline
These are not reserved keywords, but azslc can tolerate them as user symbols even if not recognized.
I verified that it does translate to reasonable HLSL.

For the resources, they should go in an SRG, the sample viewer will have an example of the acceleration structure in an SRG I imagine.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants