Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Jul 2011
Offline Last Active Aug 30 2016 11:39 AM

Posts I've Made

In Topic: Texture array with mipmaps

30 August 2016 - 01:54 AM

Solved with

pDeviceContext->CopySubresourceRegion(pTextureArray, i * 9, 0, 0, 0, pNewTexture, 0, 0);


In Topic: Quaternion as angular velocity

30 May 2016 - 11:01 AM

Thanks for the replies, at first i thought i shouldn't use slerp as i couldn't simply transfer from one orientation to another, and really need angular velocity. Then i realized i can use slerp to create angular velocity if i simply lerp between identity quaternion and Q1->Q2 quaternion.

What i did:


get quaternion that points from matrix 1 to matrix 2: Q1 -> Q2

to get this i did q = Q1^(-1) * Q2


now q is orientation that is requires to rotate Matrix 1 to Matrix 2

to get a small part of this orientation every frame update

quatnow = XMQuaternionSlerp(XMQuaternionIdentity(), m_vAdjustQuat, fElapsedTime / CLIENT_POSITION_ADJUST_TIME);

m_mWorldMat = XMMatrixRotationQuaternion(quatnow)*m_mWorldMat;


This looks kinda promising but there are still some visible lags.

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:


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



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);

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?