Author Topic: Discarded geometry while rendering to texture  (Read 2361 times)

Offline zbych

  • int
  • **
  • Posts: 75
    • View Profile
Discarded geometry while rendering to texture
« 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?


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Discarded geometry while rendering to texture
« Reply #1 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.

Offline zbych

  • int
  • **
  • Posts: 75
    • View Profile
Re: Discarded geometry while rendering to texture
« Reply #2 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Discarded geometry while rendering to texture
« Reply #3 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Discarded geometry while rendering to texture
« Reply #4 on: March 05, 2013, 09:01:05 pm »

Offline zbych

  • int
  • **
  • Posts: 75
    • View Profile
Re: Discarded geometry while rendering to texture
« Reply #5 on: March 05, 2013, 09:19:45 pm »
Thank you! It works perfect now :D