Hello all!
I've been working on packing multiple lights into one texture.
It was going well but recently I hit a Problem and can't get any further:
Depth mapping in two passes in one technique works for one light (because the cubemap is rendered at the Position of one of the lights but not the other) but not the other:
technique DepthMap_L1
{
pass p1
{
VertexShader = compile vs_2_0 VS_L0();
PixelShader = compile ps_2_0 PS_L0();
}
pass p2
{
VertexShader = compile vs_2_0 VS_L1();
PixelShader = compile ps_2_0 PS_L1();
AlphaBlendEnable = True;
SrcBlend = ONE;
DestBlend = One;
}
}
Depthmapping in two techniques (with two cubemap renders) works for light cast on the Scene but not for shadows cast by Scene objects:
technique DepthMap_L0
{
pass p1
{
VertexShader = compile vs_2_0 VS_L0();
PixelShader = compile ps_2_0 PS_L0();
}
}
technique DepthMap_L1
{
pass p1
{
VertexShader = compile vs_2_0 VS_L1();
PixelShader = compile ps_2_0 PS_L1();
AlphaBlendEnable = True;
SrcBlend = ONE;
DestBlend = One;
}
}
Project, shader and exe (compiled with first variation) in download [~7MB].
What am I doing wrong? I expected that the second variant would work but I don't understand why that dosen't Show shadows from Scene objects.
Any help is appreciated!
Thanks,
Bruce
"... Why the hell did I chose game creation as a hobby!?" - Burning Feet Man