BlindSide Can u suggest me the way of mod XEffect support far away objects ?
2. I founded article in gamedev.net Soft-Edged Shadows by Anirudh.S Shastry (http://www.gamedev.net/reference/articl ... le2193.asp)
but i try port to irrlicht in Step 1: Rendering the shadow map my result is a white canvas texture ??? but in example is a blue color
vertex and pixel shader i copy and paste to irrlicht
vertex shader
Code: Select all
struct VSOUTPUT_SHADOW
{
float4 vPosition : POSITION;
float fDepth : TEXCOORD0;
};
VSOUTPUT_SHADOW VS_Shadow( float4 inPosition : POSITION )
{
// Output struct
VSOUTPUT_SHADOW OUT = (VSOUTPUT_SHADOW)0;
// Output the transformed position
OUT.vPosition = mul( inPosition, g_matLightViewProj );
// Output the scene depth
OUT.fDepth = OUT.vPosition.z;
return OUT;
}
Code: Select all
float4 PS_Shadow( VSOUTPUT_SHADOW IN ) : COLOR0
{
// Output the scene depth
return float4( IN.fDepth, IN.fDepth, IN.fDepth, 1.0f );
}
best regards