Jump to content
  • Advertisement
Sign in to follow this  
LeonPost

Post Processing Problems

This topic is 3760 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am doing a simple prost process effect and I am getting very strange blur/fade problem. When I render my scene anything that is not light just becomes this blury area of nothing that starts as the seconds clears color. When I move around and a "light" area goes over it it will grab it and fade that area. While I may not be giving me the best explaination, hopefully someone will notice something with my code. I even get this when I do not pass in the shader. Creating the texture
	pD3Dev->CreateTexture(nWidth, nHeight, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &m_pRenderTarget, NULL);
Rendering everything
	m_pD3D->Clear(255, 255, 255);
	m_pD3D->DeviceBegin();
	m_pD3D->GetDirect3DDevice()->LightEnable(1, true);

	LPDIRECT3DDEVICE9 pD3Dev = CDirect3D::GetInstance()->GetDirect3DDevice();
	m_pD3D->SpriteBegin();
	m_pMouse->RenderMouse();

	// Sprites are done loading, now change to the actual view.
	m_pD3D->GetDirect3DDevice()->SetTransform(D3DTS_VIEW, &m_pCam->GetViewMatrix());
	m_pD3D->GetDirect3DDevice()->SetTransform(D3DTS_PROJECTION, &m_pCam->GetProjectionMatrix());

	// Get the render target
	m_pD3D->GetDirect3DDevice()->GetRenderTarget(0,    &m_pBackbuffer);

	// Get the "texture" of the surface.
	LPDIRECT3DSURFACE9 pSurface = NULL;
	m_pRenderTarget->GetSurfaceLevel(0, &pSurface);

	pD3Dev->SetRenderTarget(0,    pSurface);
	pSurface->Release();

	// Render everything (the first time)
	m_pOM->RenderAll();

	m_pD3D->SpriteEnd();
	m_pD3D->DeviceEnd();

	pD3Dev->SetRenderTarget(0, m_pBackbuffer);
	m_pBackbuffer->Release();

	m_pD3D->Clear(0,0,0);
	m_pD3D->DeviceBegin();
	m_pD3D->SpriteBegin();

	m_pD3D->GetSprite()->Draw(m_pRenderTarget, 0, 0, 0, 0xffffffff);

	m_pD3D->SpriteEnd();
	m_pD3D->DeviceEnd();
	m_pD3D->Present();

Share this post


Link to post
Share on other sites
Advertisement
Also, the lighting I am doing is through a shader. If I do not use the shader and I use regular Fixed Function pipeline. If I just use fixed function then all my textures seem blurry.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!