Due to the very similar design and syntax, how hard would it be to write
a convertor or parser that would convert between the three high-level
shading languages: HLSL, Cg, and HLSL?
Please log in or register to post a reply.
If I remember correctly, HLSL and Cg were designed to be
interchangeable. Having not used both, I’m not sure how much different
Cg/HLSL are from GLSL though. If it’s a matter of syntax, the conversion
would be relatively easy I’d expect. However, if the languages were
divergant on a deeper level, it could be harder because you’d have to
actually change what code does (imagine converting between C and python,
or lisp and basic).