Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Jul 2012
Offline Last Active Yesterday, 05:47 PM

Posts I've Made

In Topic: Estimating development time

16 August 2016 - 02:03 PM

Thank you guys, I really appreciate your feedback. ^_^

In Topic: Diretcx Rotation Matrix Problem

06 August 2016 - 02:19 AM

In one of your shaders, you're treating position as a row vector, and in the other as a column vector. There's no need to be using opposite mathematical conventions in each API; it will be far less confusing to use the same conventions and code between both APIs.


Huh, I didn't even think of that. Sorry I'm kind of new to this whole matrix multiplication thing :)


Thanks  :D

In Topic: Diretcx Rotation Matrix Problem

05 August 2016 - 05:21 PM

You can't expect your code to work since the projection matrix is missing. I copied over below the one I'm using currently (RH):

Mat4 PerspectiveRH(float fovy, float aspect, float zNear, float zFar)
	float f = tanf(0.5f * (PI - fovy));
	float invRange = 1.0f / (zNear - zFar);
	Mat4 A =
	{ {
		{ f / aspect, 0.0f, 0.0f,                        0.0f },
		{ 0.0f,       f,    0.0f,                        0.0f },
		{ 0.0f,       0.0f, invRange * (zNear + zFar),  -1.0f },
		{ 0.0f,       0.0f, invRange *  zNear * zFar,    0.0f }
	} };
	return A;

You should also swap your multiplication order to matrix-vector in the shader. Example:

void main(in float3 InPos : POSITION, out float4 OutPos : SV_Position) 
   float4 HomoPos = float4(InPos, 1.0);
   OutPos = mul(ProjectionMatrix, HomoPos);

Good luck!



Well I didn't think I needed to add the projection matrix yet since OpenGL didn't need one. Obviously I was wrong. Thanks :)

In Topic: Diretcx Rotation Matrix Problem

05 August 2016 - 04:51 PM

Disable depth. 



I'm so dumb. I thought I disabled depth. It turns out I didn't. After setting DepthClipEnable to false, everything worked just fine. Thanks

In Topic: Diretcx Rotation Matrix Problem

05 August 2016 - 04:26 PM

This tutorial seems to be a good introduction for begginers:




I agree, but that still doesn't help me with this problem. I have no interest in using the built-in Math library in DirectX.