if (hmgr.isLanguageSupported("cg"))
{
mShaderLanguage = "cg";
}
else if (hmgr.isLanguageSupported("glsl"))
{
mShaderLanguage = "glsl";
}
else if (hmgr.isLanguageSupported("glsles"))
{
mShaderLanguage = "glsles";
}
else if (hmgr.isLanguageSupported("hlsl"))
{
mShaderLanguage = "hlsl";
}
else
{...
The fact Cg is pretty much not working at all with HLSL2GLSL on iOS is another bug but regardless, using RTSS to build shaders which then have to be converted into a native format just seems ugly!
Unless I have things backwards (very possible) that's kind of my point... if it chooses glsles in preference to Cg, it doesn't rely on Cg support for RTSS. As it is now, RTSS generates Cg which then gets converted using hlsl2glsl, right? Whereas in my tweak, it would generate glsles directly.
Obviously for actual Cg shaders that's a different story, but it's quite possible I'd write proper glsles shaders and still want to use RTSS for simple materials.
Yeah I suppose so. I guess then it would basically never use Cg for GLES2. Cg would only really be supported for non-RTSS generated programs. I see that logic better now.