Problems with cg shader

Tubulii

11-02-2010 17:01:59

Hallo,

i tried to use the shader posted here:
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=52354
but it does not work, i get an error:
18:08:26: Parsing script newLighting.material
18:08:26: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iScale does not exist. in GpuProgramParameters::_findNamedConstantDefinition at ..\src\OgreGpuProgram.cpp (line 1097)
18:08:26: Compiler error: invalid parameters in newLighting.material(18): setting of constant failed
18:08:26: OGRE EXCEPTION(2:InvalidParametersException): Parameter called iScroll does not exist. in GpuProgramParameters::_findNamedConstantDefinition at ..\src\OgreGpuProgram.cpp (line 1097)
18:08:26: Compiler error: invalid parameters in newLighting.material(19): setting of constant failed
18:08:26: OGRE EXCEPTION(5:ItemIdentityException): Unable to locate vertex program called diffuse_directional_shadow_vs. in GpuProgramUsage::setProgramName at ..\src\OgreGpuProgramUsage.cpp (line 61)

In the forum i found nobody who has the same problem.
But this shader should work in MOGRE.
I do not modified the shader, only the texturenames in the material.

Kohedlo

15-02-2010 21:39:28

Yours exception - is Parameter called iScale does not exist

About that excption - told on your linked topic -by virious ยป Sat Feb 13, 2010 9:52 pm - is the path to fix settings of line 19 and 18

P/S:

18:08:26: Compiler error: invalid parameters in newLighting.material(19):

and this tell us about "invalid parameters "in " newLighting.material" on line 19

- on this line uncorrect settings of constant(linced with iScroll). To fix it , you need write correct settings .

Tubulii

18-02-2010 15:26:43

Thank you for your answer,

Now it is working fine.