bgnerdclub / birb

6 stars 0 forks source link

Rendering Pipeline #12

Open camsoftworks2018 opened 6 months ago

camsoftworks2018 commented 6 months ago

I dont know that much about this subject so someone else should probably fill this out

Vulkan, OpenGL, WebGPU

Shaders GLSL?

how would extra modules add postprocessing passes?

camsoftworks2018 commented 6 months ago

Considering jack has most of the practical experience here ill just note what was previously discussed for contextual purposes Current schema which was quasi-discussed would revolve around a middleware module that exposed a generic set of graphics functions. Submodules implementing Vulkan, OpenGL, WebGPU and other can then go behind the middleware so they are interchangable with the rest of the modules/engine as a whole.

Alex-Programs commented 6 months ago

IMO graphics modules should be designed to be modular and swappable - something that takes "game state" and produces a graphics output. If we want a middleware we should just use WGPU.

Not sure how that would interact with the windowing system.

Given that, I think we should either build an all-in-one renderer with WGPU (https://github.com/gfx-rs/wgpu) to save time at the cost of performance or implement separate Vulkan/WebGPU implementations based on what people want to work on (ik Jack likes Vulkan).

OpenGL is pretty old at this point, it's not worth it imo.

camsoftworks2018 commented 6 months ago

Suggestion Implement a middleware thats close to WGPU's current interface Implement WGPU behind the middleware, Add future support for additional Rendering interfaces when required (If people ask for it then give what they want, we wont need to do a huge rewrite or require module maintainers to update if we just provide them a generic anyway)

In this case we can pretty easily just implement WGPU but leave wiggle room in the future and more importantly overall save time

camsoftworks2018 commented 6 months ago

Infact, since WGPU can run vulkan, OpenGL & WASM stuff, i dont think we really need a middleware. I agree with alex that WGPU can serve all our needs (probably) properly.