coding

Cross-Platform Shader Handling

When targeting all major mobile platforms and windows with a tiny team, writing all shaders for OpenGL ES3.x, D3D11 and Metal is a time consuming and error prone task. A desirable goal is to write shaders once and cross-compile or translate them for all target platforms. Windows being the primary development platform, therefore shaders are written in HLSL first. Unfortunately there’s not just pure HLSL code - there’s also quite a bunch of state associated with shaders. This article gives an overview over our current approach. Shader libraries Code generation Translation and compilation Tooling
Read more