Replies: 1 comment
-
You can test this without breaking anything by creating another graphics API for wgpu, like it is done for dx11, openGL, etc... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issues of our current graphics pipeline
Stride's hardware abstraction tied with SDSL is the core of the rendering pipeline but it's also what limits our ability to make it better/smoother.
Adding any new features requires us to have people experienced in each graphics API, to make sure each api works consistently and have our entity system work in both multithreaded and single threaded rendering.
Our current rendering pipeline is built around DX11 which works well but lacks the latest features and is not portable, OpenGL is lacking the multithreading and GPU driven rendering part, Vulkan is very low level and our abstraction is hiding a lot of complexity for the initialization, and I've not spent too much time on DX12.
On top of that we have a very intricate shader compilation system. Transpiling to HLSL makes our shader system not so portable.
Solving each of these issues would take a hell lot of time and efforts, and we would need the right people for each tasks, I don't think it could happen any time soon.
Rewriting our graphics pipeline
For that I propose we re-write our graphics pipeline to be based on something more portable, less complex and easily tied to the rewrite of the SDSL compiler to spirv. Building on top of WGPU would make our code far simpler and we would benefit from a list of advantages :
WGPU is currently supported by Apple, Google, Microsoft and Mozilla.
It's highly portable
it's abstraction over opengl, webgl, dx12 and vulkan and has been built to be working multithreaded and take advantages of web workers features in browsers.
It includes Naga (universal shader translator), and consumes spirv and wgsl. Our shader compiler could feed spirv byte code directly to WGPU without us having to use external libraries to translate to other languages.
Metal is supported
Metal 3.0 will soon be released with an implementation of ray tracing and mesh shaders paradigms, it's only a matter of time till we have it working in WGPU. Some work has already been done to include them.
it can run on a browser.
There are also disadvantages, namely Android support (it exists but not perfect), no openxr support yet (wip) and some others.
Stride 5 : highly portable .NET game engine
The goal of this rewrite would be to make sure Stride's graphics pipeline works consistently across all platforms, our efforts would focus on only one graphics api, would require contributors to learn only one paradigm and benefit from the work on WGPU by companies who have the resources to put work on it.
Beta Was this translation helpful? Give feedback.
All reactions