Author Topic: Projection matrix  (Read 2876 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Projection matrix
« 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)
« Last Edit: November 18, 2012, 06:03:42 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Projection matrix
« Reply #1 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Projection matrix
« Reply #2 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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Projection matrix
« Reply #3 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?
« Last Edit: November 18, 2012, 09:11:31 pm by Thomas. »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Projection matrix
« Reply #4 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Projection matrix
« Reply #5 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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Projection matrix
« Reply #6 on: November 19, 2012, 04:34:04 pm »
Thanks ;)