Quote:
If you can get the Red/Green materials in my previous post to work then it does indicate this
Yes, I got working using basic color materials.
Quote:
Otherwise, you don't actually have to use Cg at all. Ogre supports shaders written in HLSL/GLSL so you could try using these
I think that will take more time to learn and port, if there is no other way to make this work, then I will go for the HLSL/GLSL solution.
I read a couple of threads in the Ogre forum mentioning the same compile problems for the Cg shaders, in general if one parameter is no used then it is optimized and removed, a compile error will be produced.
Lets take as an example DessertSurface.material (used in Dessert map).
The parameter
uniform float4x4 textureMatrix, is one of the compiler errors.
Code:
OGRE EXCEPTION(2:InvalidParametersException): Parameter called textureMatrix does not exist. in GpuProgramParameters::_findNamedConstantDefinition at .\src\OgreGpuProgramParams.cpp (line 1433)
which directly point to the SingleProjectedTextureFP.cg, from what I can noticed, the parameter is being used to compute texCoords, I can't see where an optimization would happen here.
Since I couldn't find any reason for the optimization to happen, I started simplifying the shader code and removing parameters, those logged as errors, for the same Dessert map. No more default parameters where used and a simple color was returned and no more compile errors where found for the cg programs; there where a couple more for the old materials though:
Code:
Compiler error: unknown error in Brick.material(1): base object named "ColourMapAndNormalMap3D" not found in script definition
I tried removing those inheritance from the old materials, which I suspect is an old resource missing, couldn't find any file containing such definition. Would be nice to fix or submit the missing resource if that is the case. Finally, any compile errors were produced but the crash still happened
. I can send you the three logs to double check this issue.
After this tests I got confused if my video card (ATI 4650) really supports those shaders, but sure! Consider when I got your demo it perfectly runs, the compiled one using basic materials it runs. I'm starting to suspect there is a tricky compile flag or something. What do you think?
NOTE: those compile erros related to the old materials
Code:
Compiler error: unknown error in Brick.material(1): base object named "ColourMapAndNormalMap3D" not found in script definition
are also logged when running the demo I download from your site, has nothing to do IMO.