Projection matrix

Started by Thomas., November 18, 2012, 05:53:01 PM

Previous topic - Next topic

Thomas.

Please, could you add method for get projection matrix?

edit: ideally something like Camera.getProjectionMatrix() and Camera.getProjectionMatrix(float near, float far)

EgonOlsen

Actually i don't have it, because i don't care about it. I'll look into it tomorrow.

EgonOlsen

What do you need this for? Do you really need this matrix in Java code or just in the shader? If it's the latter, you can already make jPCT-AE inject it by defining a mat4 projectionMatrix in your shader.

Thomas.

#3
Quote from: EgonOlsen on November 18, 2012, 08:30:23 PM
What do you need this for? Do you really need this matrix in Java code or just in the shader? If it's the latter, you can already make jPCT-AE inject it by defining a mat4 projectionMatrix in your shader.

I need it for projected shadows... yes I know I use it for motion blur, but I need projection matrix from projector.

Quote from: EgonOlsen on November 18, 2012, 07:01:48 PM
Actually i don't have it, because i don't care about it. I'll look into it tomorrow.
Is possible project perspective shadows without projection matrix? How you create model view projection matrix without projection matrix?

EgonOlsen

Quote from: Thomas. on November 18, 2012, 09:03:29 PM
Is possible project perspective shadows without projection matrix? How you create model view projection matrix without projection matrix?
Well, i do have it somehow just not at that stage where you want to access it and i don't really store it. I'll add something tomorrow.

EgonOlsen

I've updated the betas with a version that adds getProjectionMatrix()-methods to Camera. I hope they work as expected.