Author Topic: setProjector for JPCT-AE ?  (Read 161 times)

Offline MichaelJPCT

  • long
  • ***
  • Posts: 140
    • View Profile
setProjector for JPCT-AE ?
« on: May 18, 2017, 07:26:30 am »
i see Projector class in javadoc of jpct-ae, but no setProjector method in Texture class like the one in jpct-desktop. would it be added?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: setProjector for JPCT-AE ?
« Reply #1 on: May 18, 2017, 09:00:15 am »
I've no plans for it. In jPCT-AE, it's used for the ShadowHelper only, mainly to keep that class' signature similar to that of desktop jPCT.

If you want projective texturing, I suggest to write your own shader that does it instead.

Offline MichaelJPCT

  • long
  • ***
  • Posts: 140
    • View Profile
Re: setProjector for JPCT-AE ?
« Reply #2 on: May 18, 2017, 09:37:59 am »
ok, thanks. i guess i can do it.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: setProjector for JPCT-AE ?
« Reply #3 on: May 18, 2017, 10:04:10 am »
The default shaders in the jar contains fragments of shader code for the shadow mapping. These fragments use projection for the depth map. Maybe that helps. If not, I can post the code for the ShadowHelper later to show how to set up the needed matrix if that's a problem.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11771
    • View Profile
    • http://www.jpct.net
Re: setProjector for JPCT-AE ?
« Reply #4 on: May 18, 2017, 08:32:30 pm »
I just noticed that you can obtain the projection matrix from the Projector... ;)