www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Thomas. on November 18, 2012, 05:53:01 pm

Title: Projection matrix
Post by: Thomas. on November 18, 2012, 05:53:01 pm
Please, could you add method for get projection matrix?

edit: ideally something like Camera.getProjectionMatrix() and Camera.getProjectionMatrix(float near, float far)
Title: Re: Projection matrix
Post by: 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.
Title: Re: Projection matrix
Post by: 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.
Title: Re: Projection matrix
Post by: Thomas. on November 18, 2012, 09:03:29 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.

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?
Title: Re: Projection matrix
Post by: EgonOlsen on November 18, 2012, 10:21:04 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.
Title: Re: Projection matrix
Post by: EgonOlsen on November 19, 2012, 01:50:04 pm
I've updated the betas with a version that adds getProjectionMatrix()-methods to Camera. I hope they work as expected.
Title: Re: Projection matrix
Post by: Thomas. on November 19, 2012, 04:34:04 pm
Thanks ;)