Jump to content

  • Log In with Google      Sign In   
  • Create Account

korvax

Member Since 20 Jun 2012
Offline Last Active Oct 02 2014 12:41 AM

Posts I've Made

In Topic: Help with WorldViewProjection

26 September 2014 - 04:52 AM

HI, thx for you help, problem solved your help was much appreciated.


In Topic: Help with WorldViewProjection

26 September 2014 - 02:46 AM

Thx tonemgub, im now using ROW, so atleast I have no transpose..


In Topic: Help with WorldViewProjection

26 September 2014 - 12:43 AM

Hi, thx, but even if I change to vsS.mWordViewProjection = XMMatrixTranspose(model_matrix*this->m_View*this->m_Projection); Im still getting same black output. I think it has to be with my WVP matrix, because it works when im doing the calculation on the shader.

In Topic: Problem with Constant Buffer Size.

22 September 2014 - 12:28 PM

Hi, thx a lot for your help. No more warnings, now off to the second problem to try to make the shader to work.. 

 

cheers.


In Topic: Problem with Constant Buffer Size.

22 September 2014 - 10:57 AM

Hi, I realized that I hade another constant buffer that was 48bytes long on b0 as well (thx megadan). I have now changed light structure to b1, no warnings, but all values in the structure (in shader space) are zero, so I guess I need to change something on the c++ side so the structure fills at register 1 and not 0?

	struct cbPerLight sCbLight;	 		
	sCbLight.lightColor = light.Color;
	sCbLight.lightDirection = light.Direction;
	sCbLight.lightPosition = light.Position;
	sCbLight.lightAngle = light.Angles;
	sCbLight.lightRange = XMFLOAT4(2.0f, 1.0f, 1.0f, 1.0f);	

m_pContext->UpdateSubresource(pixelShader.GetConstantBuffer()->m_pBuffer, 0, nullptr, &sCbLight, 0, 0);

your help is much appreciated.


PARTNERS