Jump to content
  • Advertisement
Sign in to follow this  
xsirxx

Yet another shader problem, need more help :).

This topic is 4770 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

Sorry for all the requests lately, im figuring out very quickly im not the best at this shader programming :). Anywho I use fragmented shaders and deferred lighting. This is a deferred lighting one. The problem comes out when I run the game, when the shader compiles. This runs fine on my nvidia 6200(not TC) and yet will not on my SLI 6600GT setup. Here is the code:
float4 OmniLightingPS(VS_OUTPUT1 In) : COLOR
{
	half4 diffuse		= tex2D(MRT0, In.TexCoord);

	float3 Att			= LightVector * LightRange;
	float4 Attenuation	= mul(Att, Att);

    return ( diffuse *  (1 - Attenuation) );
}
pixelfragment OmniPixelFragment	= compile_fragment ps_2_0 OmniLightingPS();



It stops running at the return. If I replace the return to just the (diffuse) it runs fine. Here is how its compiled.
		pFragmentLinker->LinkShader( "ps_2_0", 0, aHandlesPostPS, (UINT)iPostCount, &pCodePS, NULL );
		pShaderCode = (DWORD*)pCodePS->GetBufferPointer();



The 2nd line is where the debug stops at, thats because pShaderCode is still NULL instead of being filled from the link shader. Any ideas would be alot of help, again sorry about all the posts with these shaders. Thanks, Brad

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!