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
#Depth sorting seems back to front?
15 messages · Page 1 of 1 (latest)
well, does it work when you switch the depth test around? from GEQUAL to LEQUAL or vice versa? in the end to fully understand why it looks the way it does you have to go through the full chain of how your depth at a certain pixel is calculated of course, but there's no shortcut for that. you just have to make sure you understand every step of the chain.
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
It’s currently set to less than
@distant mirage doesn't seem to be effected by draw order either
Can you try out greater than (/or equal)?
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
do you even have a depth buffer?
you can also always send the .rdc file