Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualbearsomg

Posted 02 June 2013 - 04:09 PM

Thanks for the help!

 

I haven't explicitly done anything to disable blending, but I do not have a blend state set for the technique to generate the G-buffer. Does this suffice, or is there something else I should do?

EDIT: I changed the technique to do this and the clear color doesn't affect the output anymore:

 

BlendState DisableBlending
{
    BlendEnable[0] = FALSE;
    RenderTargetWriteMask[0] = 1 | 2 | 4 | 8;
};
technique10 SSAO_T
{
    pass P0
    {
        SetBlendState(DisableBlending, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);
        SetVertexShader( CompileShader( vs_4_0, VS_Dif() ) );
        SetPixelShader( CompileShader( ps_4_0, PS_Dif() ) );
        SetGeometryShader( NULL );
    }
}

 

 

 

About the normals, I was a bit confused as to what to do about that. I saw different code samples just writing the normals out, and some encoding it. I changed mine to do the encoding just now.

 

I've also changed the sampler to use point sampling. Does this automatically correct for the 0.5 offset, or do I need to do that myself?

 

I noticed a problem which I also fixed, and this seemed to have the most effect on the output. The textures I was rendering to were created with DXGI_FORMAT_R8G8B8A8_UNORM, and I changed that to DXGI_FORMAT_R16G16B16A16_FLOAT, as that is what is needed to hold the G-buffer.

 

This is my output right now, any idea where that height-map like effect is coming from?

ssaotest.jpg


#2bearsomg

Posted 02 June 2013 - 03:36 PM

Thanks for the help!

 

I haven't explicitly done anything to disable blending, but I do not have a blend state set for the technique to generate the G-buffer. Does this suffice, or is there something else I should do?

 

About the normals, I was a bit confused as to what to do about that. I saw different code samples just writing the normals out, and some encoding it. I changed mine to do the encoding just now.

 

I've also changed the sampler to use point sampling. Does this automatically correct for the 0.5 offset, or do I need to do that myself?

 

I noticed a problem which I also fixed, and this seemed to have the most effect on the output. The textures I was rendering to were created with DXGI_FORMAT_R8G8B8A8_UNORM, and I changed that to DXGI_FORMAT_R16G16B16A16_FLOAT, as that is what is needed to hold the G-buffer.

 

This is my output right now, any idea where that height-map like effect is coming from?

ssaotest.jpg


#1bearsomg

Posted 02 June 2013 - 03:36 PM

Thanks for the help!

 

I haven't explicitly done anything to disable blending, but I do not have a blend state set for the technique to generate the G-buffer. Does this suffice, or is there something else I should do?

 

About the normals, I was a bit confused as to what to do about that. I saw different code samples just writing the normals out, and some encoding it. I changed mine to do the encoding just now.

 

I've also changed the sampler to use point sampling. Does this automatically correct for the 0.5 offset, or do I need to do that myself?

 

I noticed a problem which I also fixed, and this seemed to have the most effect on the output. The textures I was rendering to were created with DXGI_FORMAT_R8G8B8A8_UNORM, and I changed that to DXGI_FORMAT_R16G16B16A16_FLOAT, as that is what is needed to hold the G-buffer.

 

This is my output right now:

ssaotest.jpg


PARTNERS