Hi there!
I was just wondering, how to access the backbuffer in HLSL. I actually wrote a function that should set it to the shader, but it isn't working:
void Shader::ResolutionChanged()
{
if(BackBufferVariable)
{
ID3D10RenderTargetView* RTV;
DXUTGetD3D10Device()->OMGetRenderTargets(1,&RTV,NULL);
BackBufferVariable->SetRenderTarget(RTV);
RTV->Release();
}
}
While BackBufferVariable is a
ID3D10EffectRenderTargetViewVariable *
further, I don't know how to declare the texture in HLSL. Do I just have to use
something like this?:
Texture2D Scene;
And do I need to use a special sampler?
Please help me fixing that. I'm making a post-processing interface at the moment, and I think i *could* need this! :D