Winter091 / Peanut

OpenGL/Dx11 C++ Game Engine
MIT License
0 stars 0 forks source link

Use same shaders for OpenGL and DirectX #33

Open Winter091 opened 2 years ago

Winter091 commented 2 years ago

Now it works kinda ugly: we have separate shader sources for ogl and dx, and for dx the _dx11 suffix is added. it's very possible to write shaders in glsl and then convert them to hlsl, effectively reducing time required to write shaders by a factor of 2. It's usually done using glslang + SPIRV-Cross