I'm porting some custom material shaders from Metal to HLSL, and I got an error message
that I don't understand:
Code: Select all
17:04:57: Parsing script JWStereo.material
17:04:57: OGRE EXCEPTION(5:ItemIdentityException): Parameter called pixelWidth does not exist. Known names are: in GpuProgramParameters::_findNamedConstantDefinition at D:\MoreCode\Ogre\ogre-next-fork\OgreMain\src\OgreGpuProgramParams.cpp (line 2209)
17:05:03: Compiler error: invalid parameters in JWStereo.material(277): setting of constant failed
17:05:03: OGRE EXCEPTION(5:ItemIdentityException): Parameter called pixelHeight does not exist. Known names are: in GpuProgramParameters::_findNamedConstantDefinition at D:\MoreCode\Ogre\ogre-next-fork\OgreMain\src\OgreGpuProgramParams.cpp (line 2209)
This is saying that a parameter specified in a fragment_program_ref object of the material
script is not being found in a shader program, right? The Ogre log doesn't say which
HLSL file it's looking at, but all of the HLSL files referenced by this material script
begin with
Code: Select all
Texture2D<float4> colorLeft : register(t0);
Texture2D<float> depthLeft : register(t1);
Texture2D<float4> colorRight : register(t2);
Texture2D<float> depthRight : register(t3);
uniform int pixelWidth;
uniform int pixelHeight;
so I can't see why Ogre can't find pixelWidt
h and pixelHeight
.