Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


-Tau-

Member Since 13 Jul 2011
Offline Last Active Jul 17 2015 12:35 AM

Posts I've Made

In Topic: Game login - password sending security

15 July 2015 - 12:04 PM

Sorry i forgot to mention, i'm using C++ with RakNet library.


In Topic: Texture render target size

10 February 2015 - 01:28 PM

Well, you must still set the correct viewport. I don't see you doing that.

 

THIS, thank you good sir.


In Topic: Texture render target size

10 February 2015 - 12:10 PM

Scene rendered with shadows:

Here size of shadow map texture is same as size of window:

http://postimg.org/image/oiliy12xp/

Here size of shadow map is 1024x1024, different than size of window:

http://postimg.org/image/cz226jcgh/

 

Maybe i asked a wrong question in the first place.

This is how i switch render targets:

	ID3D11RenderTargetView *prentw = 0;
	ID3D11DepthStencilView *dsw = 0;
	float ClearColor[4] = { 0.0f, 0.0f, 0.0f, 1.0f };

	pd3dImmediateContext->OMGetRenderTargets(1, &prentw, &dsw);
	pd3dImmediateContext->OMSetRenderTargets(1, &m_ShadowCtrl->m_pShadowRTV[0], m_ShadowCtrl->m_pDSV);
	pd3dImmediateContext->ClearDepthStencilView(m_ShadowCtrl->m_pDSV, D3D11_CLEAR_DEPTH, 1.0, 0);
	pd3dImmediateContext->ClearRenderTargetView(m_ShadowCtrl->m_pShadowRTV[0], ClearColor);

//
// rendering
//

	pd3dImmediateContext->OMSetRenderTargets(1, &prentw, dsw);
	SAFE_RELEASE(dsw);
	SAFE_RELEASE(prentw);

After pd3dImmediateContext->OMSetRenderTargets(1, &m_ShadowCtrl->m_pShadowRTV[0], m_ShadowCtrl->m_pDSV); the size of render target changes from size of window to size of texture.

Does ID3D11DeviceContext know that the size changed? If no, how do i tell him?


In Topic: Texture render target size

10 February 2015 - 08:49 AM

What i want to do: i want to apply blured shadows to my scene. I know how shadow maps work.

First i render the scene depths from point of light with (yes) orthogonal projection matrix to a texture. First image

Then i apply blur efect to this texture. Second image.

Then i use this texture to determine whitch parts of the rendered scene are in shadows.

 


In the third and fourth pictures you provide links to, it's not clear exactly what the red-and-black image is. The third image appears to be the original unblurred depth map rendered somehow with a different view, perhaps a perspective (vs. orthogonal) projection? The fourth image appears to be the blurred depth map rendered with yet a different view?

 

Now this is where things get complicated. The third image is renderd in the same way as the first. Same projection matrix. The fourth image is the same as the second image. Same blur effect same projection matrix. The only difference between first/third, second/fourth image is the size of texture to whitch i render. First and second textures have same size as screen and third and fourth have size 1024 x 1024.


In Topic: Texture render target size

10 February 2015 - 06:12 AM

Problem isn't creating custom sized texture, problem is using custom size texture as render target.

I show it, these are textures with screen size:

depth:

http://postimg.org/image/6op6bvezj/

blur:

http://postimg.org/image/6431k9ibt/

These are textures with size 1024 x 1024:

depth:

http://postimg.org/image/k3c8wuaoh/

blur:

http://postimg.org/image/bufazvrex/

Rendered scene wont fit into that texture.


PARTNERS