Converting the CG shaders to GLSL

SomeFusion

01-11-2008 19:04:54

Hi,

has somebody attempted to convert the CG shaders to GLSL? I know the shaders work with OpenGL. But the problem is that the precompiled python-ogre distribution for Ubuntu can never include CG. So its either GL or nothing. I have been looking through the cg source and tried ATI's HLSL2GLSL converter but I always get errors. Some pointers where I could start looking for GLSL information would be nice.

Thanks,
SomeFusion

jjp

02-11-2008 03:12:59

I'd take a look at this and convert the shader code by hand:

http://www.opengl.org/wiki/index.php/Sh ... ages:_GLSL
http://www.mew.cx/glsl_quickref.pdf

That ATI tool unfortunatly never really worked for me.