#Depth sorting seems back to front?

15 messages · Page 1 of 1 (latest)

ripe egret
#

I'm drawing three cubes all at the same scale at different positions, I'm wondering if the issue is related to the depth buffer or something else, maybe something with my view matrix calculation, I'm really scratching my head on how to debug this issue further

distant mirage
#

it could also be that the depth test is disabled / always passes, and you just happen to draw the boxes in such a way that they have the order they have on the screen

ripe egret
ripe egret
#

@distant mirage doesn't seem to be effected by draw order either

distant mirage
#

from the looks of your depth buffer this shouldn't actually work (the closer objects seem to have smaller values), but why not

#

also make sure depth writing is enabled.

#

actually, looking at those screenshots, are you sure the output is actually wrong? at least in a still image it looks like it might actually be fine, just looks weird because of the texturing

#

the depth buffer seems to look correct after all

#

ah they're all supposed to be the same scale, so that big white one is closer

#

are you rendering using reverse z in your matrix? 😂

#

it's a bit confusing to debug remotely

orchid whale
#

do you even have a depth buffer?

pearl hinge
#

you can also always send the .rdc file