Original Post
Hi
I'm trying to render a scene to a render target, blur it and then output it to the back buffer. The thing is that only the top left half of the scene gets rendered to the back buffer.
Original:
[attachment=1679:original.jpg]
Post processed:
[attachment=1680:blured.jpg]
I narrowed it down to be an issue with the render target texture size - the scene gets rendered to a texture matching the viewport size ( lets say 800x600 ). The blur filter renders its results to a texture half that size ( 400x300 ), and then that texture gets rendered back to the viewport's backbuffer ( 800x600).
Somewhere along the way the image is cropped and only its top left part gets rendered.
I removed everything from the blur pixel shader, leaving only a simple pass-through code there, which also yielded such results. Here's the code:
Could you please tell me what I'm doing wrong?
Thanks,
Paksas
I'm trying to render a scene to a render target, blur it and then output it to the back buffer. The thing is that only the top left half of the scene gets rendered to the back buffer.
Original:
[attachment=1679:original.jpg]
Post processed:
[attachment=1680:blured.jpg]
I narrowed it down to be an issue with the render target texture size - the scene gets rendered to a texture matching the viewport size ( lets say 800x600 ). The blur filter renders its results to a texture half that size ( 400x300 ), and then that texture gets rendered back to the viewport's backbuffer ( 800x600).
Somewhere along the way the image is cropped and only its top left part gets rendered.
I removed everything from the blur pixel shader, leaving only a simple pass-through code there, which also yielded such results. Here's the code:
float4 PassThroug( in float2 t : TEXCOORD0 ) : COLOR
{
float4 col = tex2D( inputTex, t );
return col;
}
Could you please tell me what I'm doing wrong?
Thanks,
Paksas