Jump to content
  • Advertisement
Sign in to follow this  
LukasBanana

XShaderCompiler (HLSL to GLSL translator)

This topic is 653 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

Nice I will check it out!

 

I havent tried it yet, but could you describe how you translate things like SamplerStates and texture sampling?

Off topic:
I'm doing a similar thing, and I call it again XShader(https://github.com/ongamex/XShader) it is nowhere near completion - but yeah I guess the race for the name is ON :D

Edited by imoogiBG

Share this post


Link to post
Share on other sites

Nice I will check it out!

 

I havent tried it yet, but could you describe how you translate things like SamplerStates and texture sampling?

Off topic:
I'm doing a similar thing, and I call it again XShader(https://github.com/ongamex/XShader) it is nowhere near completion - but yeah I guess the race for the name is ON :D

 

I first had the name XShader in mind, but checked it on GitHub, to see if there are other projects with this name.

So I changed it to XShaderCompiler ^^

 

Unfortunately, GLSL still lacks the logic separation of sampler states and texture buffers, although there are Sampler Objects in OpenGL.

So I remove all appearances of SamplerState in the AST and only translate the Texture2D etc. to sampler2D respectively.

 

e.g. "tex0.Sample(samplerState0, texCoord)" becomes "texture(tex0, texCoord)".

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!