Sign in to follow this  
david_watt78

directx 10 fx file question

Recommended Posts

anyone know how to declare rendertargets and set them in an fx file? I know there is an interface to get and set them as well as depth/stencil views. But, I have found nothing in the sdk docs, samples , or online on how that works in the fx file or for that matter any good in depth info on the fx file format.

Share this post


Link to post
Share on other sites
What do you want exactly?
You can use something like this, to output to multiple render targets at the same time:

struct PS_Output
{
float a : SV_Target0;
float2 b : SV_Target1;
float3 c : SV_Target2;
float4 d : SV_Target3;
};


The render targets are declared and set in the application, as you say.

Share this post


Link to post
Share on other sites
There is an interface ID3D10EffectRenderTargetView in the D3D10 Effect classes. Its a variable type so I would need to know what name to use in getting the variable from the effect class. I assume there must be a way to name the rendertargets, unless the name is the semantic. I have been trying to find any info on this and have been unsuccessful.I have a solution that works now but using that variable would be simpler from my code perspective as the render target would become another variable to set once in the effect class and not need to change in the future.

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