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

Offline MichaelJPCT

  • long
  • ***
  • Posts: 136
    • 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

  • long
  • ***
  • Posts: 149
    • 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: 11749
    • 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

  • long
  • ***
  • Posts: 136
    • 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: 11749
    • 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.