#178040 - nocash - Thu Aug 15, 2013 12:04 pm
I have just noticed that no$zoomer applies a patch to no$gba, which allows it to render polygons with negative depth values (ie. negative Z or W coordinates). The patch is called "EX4". What is that for?
Normally these values should be positive. Registers like CLEAR_DEPTH, FOG_OFFSET, DISP_1DOT_DEPTH, and RearPlaneBitmap are restricted to 15bit positive values. And near plane clipping should occur at Z<0.
Maybe W buffering can end up with negative W values, even when Z passed near plane clipping? And if so, can the NDS hardware store negative W values in the "framebuffer"?
Or maybe my rendering code has rounding errors, unintentionally ending up with negative values when Z coordinates are getting too close to zero?
Did anybody experience negative depth related problems in no$gba? Or used such stuff on real NDS hardware?
Normally these values should be positive. Registers like CLEAR_DEPTH, FOG_OFFSET, DISP_1DOT_DEPTH, and RearPlaneBitmap are restricted to 15bit positive values. And near plane clipping should occur at Z<0.
Maybe W buffering can end up with negative W values, even when Z passed near plane clipping? And if so, can the NDS hardware store negative W values in the "framebuffer"?
Or maybe my rendering code has rounding errors, unintentionally ending up with negative values when Z coordinates are getting too close to zero?
Did anybody experience negative depth related problems in no$gba? Or used such stuff on real NDS hardware?