I’m currently wrinting a shader that tints specific parts of a texture with a specific color.
Now with the pixel program everything works well but when it comes to fallback implementation I get a weird behavior:
I took the Normal-Diffuse shader as base (this is the fallback for Radeon 7000) and changed to following ambient pass:
// Ambient pass
Pass {
Name "BASE"
Tags {"LightMode" = "PixelOrNone"}
Color [_PPLAmbient]
Lighting Off
SetTexture [_MainTex] {Combine texture * primary DOUBLE, primary * texture}
}
to
// Ambient pass
Pass {
Name "BASE"
Tags {"LightMode" = "PixelOrNone"}
Color [_PPLAmbient]
Lighting Off
SetTexture[_MainTex] { constantColor [_TintColor] Combine texture * primary DOUBLE, primary * texture }
}
So the only thing I did is defining a constantColor and even if I don’t realy use it, the complete texture get’s tinted with this color.
Isn’t this a strange behavior??