Hlsl To Glsl
by Mathieu · in Torque Game Engine · 11/10/2006 (12:31 am) · 2 replies
This may help some of you who need to convert HLSL code to GLSL :
http://www.macnn.com/articles/06/11/09/hlsl.to.glsl.translator/
The Graphics Product Group at AMD has released HLSL2GLSL 0.9, a tool that translates DirectX 9 HLSL shaders into the OpenGL Shading Language (GLSL). The tool is released under an open-source license to encourage continued development of this functionality by the developer community. HLSL2GLSL is usable as a stand-alone command-line tool to directly translate shader source from HLSL to GLSL. A library version of the tool is also included (along with full source-code) for use by developers in applications. The library is designed to work with input HLSL shaders up to Shader Model 3.0, and the tool generates either GLSL v1.10.59 desktop OpenGL shaders or shaders that are usable with the OpenGL ES Shading Language 1.00. The software requires Mac OS X (specific system requirements were unavailable), and is available for free.
http://www.macnn.com/articles/06/11/09/hlsl.to.glsl.translator/
The Graphics Product Group at AMD has released HLSL2GLSL 0.9, a tool that translates DirectX 9 HLSL shaders into the OpenGL Shading Language (GLSL). The tool is released under an open-source license to encourage continued development of this functionality by the developer community. HLSL2GLSL is usable as a stand-alone command-line tool to directly translate shader source from HLSL to GLSL. A library version of the tool is also included (along with full source-code) for use by developers in applications. The library is designed to work with input HLSL shaders up to Shader Model 3.0, and the tool generates either GLSL v1.10.59 desktop OpenGL shaders or shaders that are usable with the OpenGL ES Shading Language 1.00. The software requires Mac OS X (specific system requirements were unavailable), and is available for free.
About the author
Developer at frogames.com / frogames.net
#2
Anyway I'm not a shader coder so I would have difficulties finding if it works correctly ;o)
11/10/2006 (1:08 am)
I'm at work so I didn't test it yet.Anyway I'm not a shader coder so I would have difficulties finding if it works correctly ;o)
Associate Alex Scarborough
I ran it through some sample shaders and found that it still has a fair ways to go. It also doesn't work on any of the TSE shaders, just so you know. It's a spiffy tool, but I personally wouldn't use it for more than giving myself a base to start on. And really, by the time I finish finding and fixing any issues that may come up from its translation, I could have ported the shader by hand.