I hope this is not too stupid, but here it goes:
I often get things like this, like the color depth is very low:
![Image](http://img217.imageshack.us/img217/6971/green4cn.jpg)
Is there a basic setting I missed, or are these things more complicated than that?
Code: Select all
float4x4 matViewProjection;
float3 vSunPosition;
struct VS_INPUT
{
// (I currently use a vertex type with no tex coords or color)
float4 Position: POSITION0;
float3 Normal: NORMAL0;
};
struct VS_OUTPUT
{
float4 Position: POSITION0;
float3 Normal: NORMAL0;
};
VS_OUTPUT vs_main(VS_INPUT Vert)
{
VS_OUTPUT Out;
Out.Normal = Vert.Normal;
Out.Position = mul(Vert.Position, matViewProjection);
return Out;
}
struct PS_INPUT
{
float3 Normal: NORMAL0;
};
float4 ps_main(PS_INPUT Pix): COLOR0
{
float4 color = {0.4, 0.7, 0.2, 1};
float terrain_lit = dot(normalize(vSunPosition), normalize(Pix.Normal));
color = color * (0.4 + 0.7 * terrain_lit);
return color;
}
Code: Select all
float4 ps_main(PS_INPUT Pix): COLOR0
{
float4 color = {1, 1, 1, 1};
color = color * normalize(Pix.Normal);
return color;
}