I am getting some strange Errors and Warnings when loading Maya Files containing CGFX Shaders. These Errors and Warnings don’t seem to have any visual impact on the rendering in the viewport, so i am wondering if there really is a problem and if i can safely ignore these messages.
The first error I get is this:
// cgfxShaderNode::cgErrorCallBack //
// Error: Invalid parameter handle. //
// Error: C:/temp/sphericalEnvironmentMapping.cgfx(47) : warning C7021: variable “Point1Position” domain conflicts with semantics “POSITION”
This is what Point1Position looks like in the shader:
float3 Point1Position : POSITION
<
string UIName = “Point Light”;
string Object = “PointLight”;
string Space = “World”;
> = {0.0, 0.0, 0.0};
Like I mentioned earlier, this doesn’t seem to cause any issues with viewport rendering, I can move around the point light connected to the shader just fine and it renders correctly.
I should also mention that a completely different shader that also makes use of Point Lights doesn’t have this error, so I am doubly confused by this error.
The other warning I am seeing if when I hook up Nodes to Uniforms so i can have 1 node drive a parameter across many materials.
// Warning: (2476) cgfxShader node “cgfxShader11”: unable to initialize attribute “Diffuse1Map_UV_Offset” //
Diffuse1Map_UV_Offset is simply a Float2 and is connected to a place2dTexture node’s OFFSET attribute. Again, everything behaves correctly, I can type values into the place2dTexture node and see the result - I’m just confused about where the warning is coming from…