Quote:
simply setting these
my.ambient = 10;
my.albedo = 100;
wont do anything of course because this is a shader.. the normal directx material properties have no meaning for shaders. you would need to code the into the shader the lighitng properties.
I know that.
That is why I added these lines:
Code:
float4 vecSunDiffuse = float4(200.f/255.f, 200.f/255.f, 200.f/255.f, 1.f);
float4 DoSunLight(float3 N)
{
// modulate the sunlight by the surface angle
return vecSunDiffuse * dot(N,-vecSunDir);
}
...
Out.Color = vecSkill41.w + DoSunLight(N);
Quote:
... The sunlight is calculated in the vertex shader but not even applied in the pixel sahder ...
Yes, I was forgoting to put this: "FinalColor *= In.Color;" inside the pixel shader. With this I can see some ambient, but what I need is to be able to change it by the terrain ambient value.
Quote:
... and there are no pointlights calculated at all...
What do you mean by pointlights? Maybe dynamic lights? If so, I am not there yet. 