ddiakopoulos / polymer

🎨 graphics/interaction prototyping sandbox
BSD 3-Clause "New" or "Revised" License
303 stars 21 forks source link

render hardware interface (GL 4.5, DX12, VK, MTL) #19

Open ddiakopoulos opened 6 years ago

ddiakopoulos commented 6 years ago

Polymer is presently uses OpenGL 4.5 features across the codebase. The eventual goal will be to replace all GL with a rendering abstraction capable of targeting multiple graphics backends. A reasonable target might be GL, DX12, and Vulkan. For macOS, it should be possible to use MoltenVK to bring Metal2 support with minimal effort.

glsl => spir-v => api shader compiler (includes, defines, optimization, reflection)

Inspiration https://github.com/NVIDIAGameWorks/Falcor https://github.com/sgorsten/workbench

bkaradzic commented 5 years ago

Or just use bgfx? https://bkaradzic.github.io/bgfx/overview.html

ddiakopoulos commented 5 years ago

@bkaradzic of course! :) We're big fans at Adobe, clearly.

Last time I looked closely at Vulkan/spir-v support it was still in development on your end. I need to take a closer look now. There's so much great tooling for that ecosystem.

bkaradzic commented 5 years ago

Noticed here bgfx in comment here: https://github.com/ddiakopoulos/polymer/blob/1fdd5c6d4ce0e2d9cc36a70e40057e013d28b54f/samples/rhi-render/rhi.hpp#L25

Last time I looked closely at Vulkan/spir-v support it was still in development on your end. I need to take a closer look now.

VK renderer is not done yet, but SPIRV tooling is.

Whatever feature bgfx lacks it will have it faster than new renderer will have all features bgfx already has. Also allows you to focus on stuff that's unique for your project and your project does well, and I get more surface for improvement and testing.