I'm new to XNA, i created an effect and just want to use lightning but in default effect that XNA create we should do texture mapping or the model appears 'RED', because of this lines of code in the effect file:
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
{
float4 output = float4(1,0,0,1);
return output;
}
and if i want to see my model (appear like when i use basiceffect) must do texture mapping by UV coordinates. but my model does not have UV coordinates assigned or its UV coordinates is not exported. and if i do texture mapping i got error.
(i do texture mapping by this line of code and other necessary codes)
output.UV= input.UV
i have many of this models and want to work with them.(my models are in .FBX format)
when i use Bassiceffect i have no problem and model appears correctly.
how can i use "just" lightnings in my custom effects? and don't do texture mapping
(because i have no UV coordinates in my models) and my model be look like when i use BasicEffect?
if you need my complete code tell me to upload it.