#107150 - Goosey - Fri Oct 27, 2006 6:55 am
Been banging my head on this all night..
I am using orthographic projection in a 2 quad test case. When the 'front' quad moved below the 'back' quad on the y axis it would be drawn behind, otherwise drawn in front.
I recreated this demo using perspective mode and found I could recreate the 'flicker' effect if I set both quads to the same Z-depth. This leads me to believe this is how the DS handles z-fighting (low the scanline the poly reaches, the sooner it is drawn). The odd thing about this all is that changing the Z-Depth in orthographic mode did not make the flickering stop.
NOTE: this is a problem appear only on hardware, emulators are not showing this behavior.
Here is an *.nds for the ortho:
www.goosey.info/temp/wtf_Ortho.nds
Here is an *.nds for the perspective:
www.goosey.info/temp/wtf_Persp.nds
Controls for both:
- arrows - move jet
- l/r - rotate jet (this can cause flicker if rotations cause it to go 'south' of the drunken coders quad).
- y/x - change jet z-depth
- a/b - change drunken z-depth
( same controls )
I am pretty fucking stumped, any ideas?
Things I did look at:
- The ortho appears to not 'squish' z as I thought for a bit, i set up the camera to look at it from an angle and z obviously effected something.
- Changing the draw order doesn't solve this issue (jet is drawn second in those demos tho)
- :(
Ill post code tomorrow (making this post quickly as security shoos the students out, building closing for the night).
I am using orthographic projection in a 2 quad test case. When the 'front' quad moved below the 'back' quad on the y axis it would be drawn behind, otherwise drawn in front.
I recreated this demo using perspective mode and found I could recreate the 'flicker' effect if I set both quads to the same Z-depth. This leads me to believe this is how the DS handles z-fighting (low the scanline the poly reaches, the sooner it is drawn). The odd thing about this all is that changing the Z-Depth in orthographic mode did not make the flickering stop.
NOTE: this is a problem appear only on hardware, emulators are not showing this behavior.
Here is an *.nds for the ortho:
www.goosey.info/temp/wtf_Ortho.nds
Here is an *.nds for the perspective:
www.goosey.info/temp/wtf_Persp.nds
Controls for both:
- arrows - move jet
- l/r - rotate jet (this can cause flicker if rotations cause it to go 'south' of the drunken coders quad).
- y/x - change jet z-depth
- a/b - change drunken z-depth
( same controls )
I am pretty fucking stumped, any ideas?
Things I did look at:
- The ortho appears to not 'squish' z as I thought for a bit, i set up the camera to look at it from an angle and z obviously effected something.
- Changing the draw order doesn't solve this issue (jet is drawn second in those demos tho)
- :(
Ill post code tomorrow (making this post quickly as security shoos the students out, building closing for the night).