Natural Selection 2 Open-Sources Its HLSL To GLSL Converter

Written by Michael Larabel in Linux Gaming on 28 March 2014 at 11:28 AM EDT. 7 Comments
LINUX GAMING
Following in the steps of Valve's kind actions towards open-sourcing some components that can help out game developers in going from Windows to Linux support (and Direct3D to OpenGL), the code used by the Natural Selection 2 game to translate from Microsoft HLSL to OpenGL GLSL shaders has been opened up.

This code translates Microsoft High-Level Shader Language (HLSL) shaders from legacy Direct3D 9 to OpenGL GL Shading Language (GLSL) shaders. The code that was opened up doesn't compile as-is but can be adapted to other game code-bases in a fairly easy manner. The OpenGL GLSL target at the end of the translation is for OpenGL 3.1. The code takes precautions to ensure that "clean" GLSL code is generated.

This code has been opened up on UnknownWorlds' GitHub. This isn't the first time we have seen an open-source HLSL to GLSL translator, but hopefully it will help some game studios, enthusiasts, and those learning HLSL/GLSL.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week