Skip to main content
GameDev.net gamedev.net
🔒 Locked

noob issues with render target size

Started by Paksas Mar 20, 2011 at 11:57 AM 1 replies 900+ views
Original Post
Paksas
Paksas
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:



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
Aqua Costa
Aqua Costa
I guess when your blur shader you dont really downsamle the original image, you simply crop it...

Post your blurring shader... And any code you find to be important
Paksas
Paksas

I guess when your blur shader you dont really downsamle the original image, you simply crop it...

Post your blurring shader... And any code you find to be important


I found the problem - I was rendering to a fullscreen quad the size of which always matched that of the screen, and not the render target size.

You have to excuse a noob

Cheers,
Paksas

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.