www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: MichaelJPCT on May 18, 2017, 07:26:30 am

Title: setProjector for JPCT-AE ?
Post by: MichaelJPCT 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?
Title: Re: setProjector for JPCT-AE ?
Post by: EgonOlsen 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.
Title: Re: setProjector for JPCT-AE ?
Post by: MichaelJPCT on May 18, 2017, 09:37:59 am
ok, thanks. i guess i can do it.
Title: Re: setProjector for JPCT-AE ?
Post by: EgonOlsen 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.
Title: Re: setProjector for JPCT-AE ?
Post by: EgonOlsen on May 18, 2017, 08:32:30 pm
I just noticed that you can obtain the projection matrix from the Projector... ;)