www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: zbych on March 04, 2013, 11:03:00 AM

Title: Discarded geometry while rendering to texture
Post by: zbych on March 04, 2013, 11:03:00 AM
Hi.

I wanted to add bloom effect to scene, however sometimes when camera is moving, some of the objects are not rendered when I make first rendering to texture.
As you can see on this screen, the bloom effect of few buildings is rendered on the roof of closest buildings - the buildings closest to camera were discarded in first render pass. Can I do something about this?

(http://s13.postimage.org/ku4ye9iqf/device_2013_03_04_102659.jpg)
Title: Re: Discarded geometry while rendering to texture
Post by: EgonOlsen on March 04, 2013, 06:48:16 PM
Maybe you are manipulating the camera directly in the touch event methods? If so, don't do it.  jPCT isn't thread safe.
Title: Re: Discarded geometry while rendering to texture
Post by: zbych on March 05, 2013, 08:07:37 PM
This problem has something to do with FrameBuffers's setVirtualDimensions. The buildings doesn't disappear when virtual dimension is not set, but in that case the bloom is rendered int totaly wrong place.
Title: Re: Discarded geometry while rendering to texture
Post by: EgonOlsen on March 05, 2013, 08:35:08 PM
Maybe the gross culling doesn't take the virtual dimensions into account...i'll look into it.
Title: Re: Discarded geometry while rendering to texture
Post by: EgonOlsen on March 05, 2013, 09:01:05 PM
Please try this jar: http://jpct.de/download/beta/jpct_ae.jar (http://jpct.de/download/beta/jpct_ae.jar)
Title: Re: Discarded geometry while rendering to texture
Post by: zbych on March 05, 2013, 09:19:45 PM
Thank you! It works perfect now :D