Author Topic: render order of opaque objects?  (Read 2335 times)

Offline MichaelJPCT

  • float
  • ****
  • Posts: 264
    • View Profile
render order of opaque objects?
« on: June 27, 2017, 10:16:56 am »
if several opaque object3d are added to a world in particular order, can i assume they are rendered in that order?

Offline AeroShark333

  • float
  • ****
  • Posts: 319
    • View Profile
Re: render order of opaque objects?
« Reply #1 on: June 27, 2017, 02:18:37 pm »
I don't think it works that way... I thought there would be some depth checking for the Object3D's when it comes to rendering order

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: render order of opaque objects?
« Reply #2 on: June 27, 2017, 08:29:44 pm »
Depth is only relevant for translucent objects. Anyway, it doesn't work for opaque either, because they are sorted by state to minimize state changes. So: No, you can't assume that.

Offline MichaelJPCT

  • float
  • ****
  • Posts: 264
    • View Profile
Re: render order of opaque objects?
« Reply #3 on: July 06, 2017, 02:27:05 pm »
here's another question: in a World, are transparent objects rendered after (speaking of time) all opaque objects?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: render order of opaque objects?
« Reply #4 on: July 06, 2017, 02:31:59 pm »
Yes, of course. Otherwise, the pixels from the opaque objects won't shine trough but overdraw them.