-
-
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 raytracing plumbing #99119
base: master
Are you sure you want to change the base?
Vulkan raytracing plumbing #99119
Conversation
Commits needs to be squashed (see https://docs.godotengine.org/en/latest/contributing/workflow/pr_workflow.html). |
d5f4b02
to
4ff001d
Compare
I had a very brief look and it looks pretty good to me, although I'd hold off on making changes that add a new rendering method. Are you planning on sticking to only supporting the hit shader workflow or would you also like to add ray query support as well? If you'd like to test your rendering without adding a new rendering method, keep in mind you can also use GDScript to drive the renderer and it should be pretty sufficient to test it out. This is also a simple way you can provide us with a demo project to test it out. |
i see that you started on a renderer too on that repo, i think your renderer could be tested/based on the godot ideas https://gist.github.com/reduz/c5769d0e705d8ab7ac187d63be0099b5 |
3eea43f
to
2e1d952
Compare
2e1d952
to
61a9d1c
Compare
b456ef5
to
a784c7d
Compare
Just focusing on the hit shader for now.
There you go: https://github.com/Fahien/godot-raytracing-gdscript-demo |
de229f2
to
2474b4d
Compare
This is very cool to see! Last night I took a look at how hard it might be adding metal support and while it's definitely out of my wheelhouse here's a commit to at least get it building on macos + a new method to guard user code from invoking raytracing when it isn't supported (also includes some precommit changes) a-johnston@a220083 ed: I have some (probably very misguided and) incomplete changes on https://github.com/a-johnston/godot/tree/raytracing-metal but giving up where it is. Currently it blows up for |
0338e1f
to
7c03c6e
Compare
f03f6a2
to
ef1d75e
Compare
2246469
to
502748c
Compare
Thanks to @Fahien for making the changes we agreed to. I won't have much time to review this until I get back in a few weeks but I'd like to know if you're willing to extend this PR to cover the other backends or if the intention is only for Vulkan to be merged first. If you wish to tackle the other APIs, I can leave you some relevant documentation on how to replicate the drivers functionality in the meantime. |
I can try, but I wonder if it would be better doing this in subsequent PRs. |
355db76
to
4e5315f
Compare
77d44b4
to
c1adab9
Compare
Done |
@Bonkahe, thank you for testing this, and do not worry for your experience level, we all started from zero and improved with time and dedication :) I suppose you expected to see the geometries in the scene, but the demo is currently not able to get them to build raytracing acceleration structures from GDscript. If you take a look at the P.S. I have been experimenting with a compositor effect in other branches, but there are still some issues to solve, but this is a story for another PR: |
df8f641
to
38b8932
Compare
- Vulkan implementations in `RenderingDeviceDriverVulkan` - Raytracing instruction list in `RenderingDeviceGraph` - Functions to create acceleration structures and raytracing pipelines in `RenderingDevice` - Raygen, Miss, and ClosestHit shader stages support - GDScript bindings - Update classes documentation - Include a-johnston RenderingDeviceDriverMetal changes - Unimplemented placeholders for Metal and D3D12. - Apply Mickeon docs suggestions - Build acceleration structure command - Expose a shader preprocessor define - Align build scratch address - Separate buffer memory barriers
38b8932
to
54b3c85
Compare
Here's a bunch of code adding some Vulkan raytracing stuff to the rendering device:
RenderingDeviceDriverVulkan
RenderingDeviceGraph
RenderingDevice
There's more in the fahien/raytracing-test branch, with code handling raygen, miss, and closest-hit shaders, but it's a hack on top of the forward clustered renderer, and it needs some "guided" refactoring.
Here's a sample which uses GDScript to drive the renderer: raytracing-gdscript-demo
I hope this changes would look useful to jump-start raytracing support.
Relevant for godotengine/godot-proposals#5162