You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use an C++ EDSL for shaders in my Inanity engine: I write a shader once in C++, and then it gets transformed at runtime to HLSL or GLSL text, taking into account whether various language features supported or not supported by graphics backend, including uniform buffers, attribute/draw instancing and so on. As an added benefit shaders can be constructed dynamically from pieces at runtime (i.e. ubershaders). See text rendering shaders for a simple example: link . This system worked very well so far for us in the Insatia game on Windows, Linux, macOS and even web (using OpenGL ES 2.0 aka WebGL with Emscripten).
Not sure if you'd really want to dive into my code though, but if you will I can help :) it's rather radical approach, the tech is quite experimental and there's no support for DX9 and Vulkan yet. Mentioning it here because as far as I know the majority of all serious engines use CG/HLSL->GLSL compiler or don't use any compiler at all, so I don't know any other widely used alternative to that.
See #49 (comment)
There's mostly hlsl-to-glsl compilers out there. Apparently Vulkan has its own thing, but it's always meant to be transpiled too? Input welcome.
The text was updated successfully, but these errors were encountered: