Sign in to follow this  
akira32

How long is the effective duration of effect state in shader code

Recommended Posts

How long is the effective duration of effect state in shader code? Like the "ZEnable" in shader code. The effective duration is only the pass? Or persist the RenderState of ZEnable=FALSE when exit the pass?
technique TShadowQVSM_ADPATIVE3 //UpdateShadowResultTextureForDeferredShading
{
	pass p0
	{
		VertexShader = (VsTextures[bUse3D_Way]);
		PixelShader  = compile ps_3_0 UpdateShadowResultTextureForDeferredShadingPS();
		
		ZWriteEnable=FALSE;
		ZEnable=FALSE;
	}
}

Share this post


Link to post
Share on other sites
Quote:
From DX SDK:
An application sets one active technique in the effect system by calling ID3DXEffect::Begin. The effect system responds by capturing all the pipeline state that can be changed by the technique in a state block. An application signals the end of a technique by calling ID3DXEffect::End, which uses the state block to restore the original state. The effect system therefore takes care of saving state when a technique becomes active and restoring state when a technique ends. If you choose to disable this save and restore functionality, see D3DXFX_DONOTSAVESAMPLERSTATE.

Share this post


Link to post
Share on other sites

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