Downsampling Problem

Started by
0 comments, last by Medo Mex 8 years, 3 months ago

Hey Guys,

After doing downsampling, the scene appear to be zoomed in, the full screen quad is rendered on the entire screen but I can't see the entire scene.

Here is what I'm doing (correct me if I'm wrong):
1. Render scene to texture (1920 x 1080 texture) and store the texture to pSceneTexture

2. Downsample: Render texture to full screen quad and pass pSceneTexture to the shader (the result will be stored in small texture (1920 / 4) x (1080 / 4)

3. Upsample: Render texture to full screen quad again and pass the texture from step 2 to the shader (this time the result will be stored in 1920 x 1080 texture)

Here is how I'm creating the full screen quad:


VERTEX vertices[] = {
{D3DXVECTOR3(1.0f,   1.0f, 0.0f), D3DXVECTOR2(1.0f, 0.0f)}, // Right Bottom
{D3DXVECTOR3(1.0f,  -1.0f, 0.0f), D3DXVECTOR2(1.0f, 1.0f)}, // Right Top
{D3DXVECTOR3(-1.0f,  1.0f, 0.0f), D3DXVECTOR2(0.0f, 0.0f)}, // Left Bottom
{D3DXVECTOR3(-1.0f, -1.0f, 0.0f), D3DXVECTOR2(0.0f, 1.0f)}, // Left Top
};

Any idea what could be causing that problem?

Advertisement

Resolved.

I was setting the view port in initialization instead of rendering.

This topic is closed to new replies.

Advertisement