Sign in to follow this  

All objects are shadowed when using MAKEFOURCC('D','F','2','4')

This topic is 3565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm having a similar problem to the guy in http://www.gamedev.net/community/forums/topic.asp?topic_id=433890. The issue with my program is that it casts a shadow onto the whole of the object but also the right shadow is cast behind the objects. I've been able to output the shadow depth buffer to an image and i've noticed that the image only contains two colours, black and white. So now it's obvious why the objects are being shadowed. Free Image Hosting at www.ImageShack.us I've done shadow mapping before using the method where the depth is written to a render target, this works, and when i output the shadow depth buffer i get a nice depth image. Here's some code:
// This Vertex shader code is used to write to the depth buffer:
/////////////////////////////////////
// Vertex Shader
/////////////////////////////////////

PSInputShadow3 VS_Main_Shadow3( float4 InPos : POSITION )
{
	SPSInputShadow3 Out = (SPSInputShadow3)0;

	Out.Pos = mul( InPos, LightWVPMat );
	Out.Pos.z /= MaxLightRange;
	// The MaxLightRange is 500, which is the lights far clip

	return Out;
}

// I've had to do this pixel/fragment shader because i'm using shader v3.0
/////////////////////////////////////
// Pixel Shader
/////////////////////////////////////

float4 PS_Main_Shadow3( PSInputShadow3 Input ) : COLOR
{
	return float4( 0, 0, 0, 0 );
}

Anyone know where i could be going wrong? Thanks Ankur

Share this post


Link to post
Share on other sites
I've never worked with that ATI extension, but I'd suggest that you check the values more carefully. It may be that the black/white in your saved image is simply a clipped version of a wider range of values. Try saving into a float DDS image, or getting the value to the CPU side and checking them there.

Share this post


Link to post
Share on other sites

This topic is 3565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this