Inside3D!
     

gl_ztrick ?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Wed Jan 16, 2008 4:27 am    Post subject: gl_ztrick ? Reply with quote

Lately, I've been trying to understand the purpose of gl_ztrick.

As far as I can tell, DarkPlaces does not use this.

Quote:
From planetquake.com/console

If this toggle is enabled the game will not clear the z-buffer between frames. This will result in increased performance but might cause problems for some display hardware.


Is gl_ztrick necessary in the modern world? Does make anything significantly faster?

Although I don't have any problems with it, I've read that some people have issues with it with, say, those Intel Integrated Media display adapters.
Back to top
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Wed Jan 16, 2008 5:49 am    Post subject: Reply with quote

It's about 10 years obsolete, I'd say. Depth clears aren't exactly expensive these days. QuakeWiki says TNT2 and newer cards should leave it off, and it comes as no surprise that a crusty old hack would be cut out of any decent modified Quake engine.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Wed Jan 16, 2008 8:02 am    Post subject: Reply with quote

Cool Wink

Of the video card problems I've seen and heard about, gl_ztrick is the source of many of them. Especially since it defaults to 1.

I've read about this causing problems in Qrack and ezQuake with some video cards.

/Noticed FitzQuake has gl_ztrick removed as well.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Wed Jan 16, 2008 12:18 pm    Post subject: Reply with quote

modern graphics cards feature optimisations which only work with ztrick disabled, as well as faster buffer clears.
This means that you'll get one to three percent better framerates with ztrick disabled. Coupled with the driver issues, all modern engines should at least default to it being off.

Its a funky trick though, and can be found in a large number of early GL applications... At least quake based ones!
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
mh



Joined: 12 Jan 2008
Posts: 910

PostPosted: Wed Jan 16, 2008 6:47 pm    Post subject: Reply with quote

Agreed, there's no need to keep it at all. Removing it will also give you a higher precision depth buffer.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group