TR Polys - Fixed(p_cxt.depth.comparison = PVR_DEPTHCMP_GEQ)

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 96
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri May 23, 2008 5:57 am
Has thanked: 0
Been thanked: 2 times

TR Polys - Fixed(p_cxt.depth.comparison = PVR_DEPTHCMP_GEQ)

Post by AtariOwl »

Separate from my other threads.

TR Polys dont seem to react in teh same way.
My TR polys are currently not depth sorting with the opaque ones.
Fog does not seem to vary with z as in OP Polys

Am i missing something which causes the TR polys to behave differently from OP?
Will PT give the same problems?
Last edited by AtariOwl on Wed Jan 25, 2017 11:38 am, edited 1 time in total.
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: TR Polys?

Post by bogglez »

The PVR has a special sorting mode for TR polygons.
Normally you have to sort all transparent polygons and then draw them in sorted order from back to front. On the Dreamcast you can draw the transparent polygons in any order.

You can turn this on/off in pvr_init autosort_disabled: http://gamedev.allusion.net/docs/kos-cu ... 6602e2447b
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Fri May 23, 2008 5:57 am
Has thanked: 0
Been thanked: 2 times

Re: TR Polys?

Post by AtariOwl »

I'm not sure i'm understanding.

My issue is that my TR poly is appearing on top of my opaque poly, no matter what their respective z's.

This is an issue if for example i wish to display a translucent fire which is partly obscured by a wall.
User avatar
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Fri May 23, 2008 5:57 am
Has thanked: 0
Been thanked: 2 times

Re: TR Polys?

Post by AtariOwl »

Nevermind it helps if i apply the same

p_cxt.depth.comparison = PVR_DEPTHCMP_GEQUAL;

to each poly context.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: TR Polys - Fixed(p_cxt.depth.comparison = PVR_DEPTHCMP_G

Post by BlueCrab »

Just as a question, are you not initializing the polygon contexts with pvr_poly_cxt_txr() before doing things with them? I'd highly recommend doing that so that you make sure that the base of the context is set up before you mess with it (and that generally gives sane defaults).
User avatar
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Fri May 23, 2008 5:57 am
Has thanked: 0
Been thanked: 2 times

Re: TR Polys - Fixed(p_cxt.depth.comparison = PVR_DEPTHCMP_G

Post by AtariOwl »

I have been playing around a bit, i think thats how i got it messed up... silly but sorted out now, and yes using pvr_poly_cxt_txr() and then changing the bits i want to fiddle with.
I'm making good progress now, opaque, punchthrough, transluscent, modifiers all working... now to decide how much of my old engine to use.
User avatar
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Fri May 23, 2008 5:57 am
Has thanked: 0
Been thanked: 2 times

Re: TR Polys - Fixed(p_cxt.depth.comparison = PVR_DEPTHCMP_GEQ)

Post by AtariOwl »

Well its all gone.
Had a HD fail and when i looked at my backups everything i did after jan 2017 is corrupted
so disappointed
User avatar
AtariOwl
DCEmu Freak
DCEmu Freak
Posts: 96
Joined: Fri May 23, 2008 5:57 am
Has thanked: 0
Been thanked: 2 times

Re: TR Polys - Fixed(p_cxt.depth.comparison = PVR_DEPTHCMP_GEQ)

Post by AtariOwl »

Starting to work back to where i was :( ugh
Post Reply