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

Move to Ash renderer (Vulkan) #118

Merged
merged 14 commits into from
Dec 31, 2023
Merged

Move to Ash renderer (Vulkan) #118

merged 14 commits into from
Dec 31, 2023

Conversation

Snowiiii
Copy link
Member

Currently we are using WGPU for Rendering, WGPU is a Great library and has many Cool & Usefull features, It Also garanties that our App will run any Platform having support for [DirectX 11/12, Vulkan, OpenGL, Metal and Webassembly]. Having that said there are some downsides too:

WGPU Cons

  • Size | WGPU is really havy and its not unsually that the File size for just an Simple Model Renderer is as high as 20+MB
  • Resource Usage | This is a big factor, WGPU uses much more RAM than our current Vulkan Implementation, And it uses much more Heap than Stack, Alomost everthing in WGPU is an Arc object, Sometimes this is usefull but not always and it has an extra Performance cost also, And because WGPU Backends are very dynamic and are coming down to just onw API, There are less Code Optimaztion.
  • Less Features | Features are an really important feature for an Engine, Often this is how Developers deciacte if they want to use an Engine or Not, Like said above WGPU has many great features, but it will never have so much like Vulkan, Vulkan has hundreds of Great Extensions, Features like : [Raytracing, Mesh-Shaders, Command buffer Recording & more] are really great and some of them already begin to come to WGPU.
  • WGSL | WGSL is the Standard Shader Language for WGPU, I wrote my own WGSL and saw the Advantages fast, You can just put diffrent pipeline stages vertex/fragment/tesl.. into one File and it had simplified some things, The WGSL integration made WGPU even more heavy and i genrelly still prefer SPIR-V, Because its just Faster. The WGSL Compiler itself (naga) is quit heavy and adds more Compile-time.
  • Compile-Time | This was a really big diffrence compared to my old PC, WGPU Compiling or even Rust-Analayzer indexing took really long and the Rust-Anaylayzer eat up alot of RAM, Now using just Vulkan there are alot less Bult-In Features and Dependencies, And the Indexing and Compiling is alot faster

Vulkan Cons

  • Complexity | Vulkan is more Complex than WGPU yeah, Alot more, But you will get mostly rewarted with the Latest & Greatest Features and a Better Performance
  • Multi Platform | The Vulkan driver itself supports basicly every common Platform besides Apple IOS/macOS, But this Problem MoltenVK will solve, On Windows Vulkan is fully supported the only Problem is that not everyone have the Vulkan Driver installed or May some GPU's don't support it, There DirectX would make sense, But i choose the Path to go Modern and just don't support very old GPU's,

Vulkan Platforms

Current Status

  • Basic | Instance, Device, Surface & more creation

  • Debug | Validation layer, Console output

  • Buffer | Buffer creation/destruction/uploading

  • Image | Image creation/destruction/image uploading

  • Pipeline | Pipeline creation, Shader Files

  • Memory Allocator | Simple but working Memory allocator

  • Depth | Working Depth Buffer

  • Model Loading | Loads Model

  • Model Rendering | Renders Model

We are now Able to Start without Crashing or any Vulkan Errors, Great Right!. The only thing is that i removed the Model Loading for now, but this will Implement soon
This was very hard :c
- Added Multi-Threading to glTF Loading
- Fixed Shader Rendering Issue
- Improvments
@Snowiiii Snowiiii added the rust Pull requests that update Rust code label Dec 31, 2023
@Snowiiii Snowiiii self-assigned this Dec 31, 2023
@Snowiiii Snowiiii merged commit c99d896 into master Dec 31, 2023
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant