1.4.0: Cg program too complex for driver

Josh Yelon,

it looks like we would have to have several cg scripts for our game. Because some work on some platforms and others don’t. So instead of having 3-4 Cg files maybe having 1 HLSL and 1 GLSL might be better off.

please think about the HLSL thing. Maybe after a while we can make our own language that is based on python and compiles to GLSL and HLSL respectively.

I am curious about something…I googled to verify and it looks like HLSL is totally proprietary compared to glsl…unless the google info I found is out of date I am curious why the reference to panda and not being lgpl or such, when support for hlsl isn’t noted similarly…? :wink: [ note: from what I read, glsl works on all major systems and unless there are some huge gaps in features/functionaltiy im stunned we’re even talking about hlsl considering the licenses involved ]

en.wikipedia.org/wiki/GLSL

or

en.wikipedia.org/wiki/High_Level_Shader_Language

just wondering

cheers
g.leej

Well, programming languages can’t really be copyrighted. HLSL is proprietary in the sense that currently, only Microsoft has an implementation. But I don’t think anything is stopping anyone else from making an implementation. That’s why it was possible for ATI to write HLSL2GLSL.

Besides, I wasn’t really thinking about legal issues. I was just thinking about write-once-run-anywhere. If we could get HLSL2GLSL working, then HLSL would work on all versions of panda - linux, windows, mac, opengl, and directx. Unfortunately, HLSL2GLSL doesn’t look so active.

So I think that maybe the idea of a dual shader (both HLSL and GLSL in one file, with a little separator) would be the most practical thing. Of course, a person could also choose to not write one of the two halves, if he didn’t care about the other platform.

I think that Panda is a much better engine than Ogre, but on this topic I would suggest you look at how you define shader programs (and all material settings) for Ogre. They have a pretty decent system for supporting multiple shader programs based on high level language (Cg,HLSL,GLSL) and shader versions supported by the card. In fact their whole material files can have multiple techniques depending on LOD or hardware support.