|
Sorry if this has been asked before, but I have problems with precision using the depth buffer. First I'm rendering stuff to several depth buffers, and afterwards I want to merge them by drawing them on top of each other with depth testing enabled. And afterwards I am using the depth test GL_EQUAL in order to shade everything. However it does not work very well. I do find that by using buffers with the same precision I get better results, but I have yet to find a combination that works. Any ideas?
|
# ¿ Nov 3, 2008 15:50 |
|
|
# ¿ Apr 29, 2024 19:42 |
|
OneEightHundred posted:You can't really do this because the depth buffer values range from 0-1, the projection matrix remaps distances between the nearplane and farplane to that range. That means if have, say, one depth range... I'm trying to work around this, but still would love if there was a way. edit: Solved. I made a fragments-shader that reads from a depth texture and compares the fragment-z and draws with a threshold. Works extremely well. BernieLomax fucked around with this message at 09:40 on Nov 5, 2008 |
# ¿ Nov 4, 2008 22:07 |
|
A thank you for this thread: this thread was invaluable for getting my demo outta the door. I couldn't make the original demo I aimed at, but made this one quicky in two days when I realized the original one was desitened to fail Anyway: http://http.de.scene.org/pub/parties/2008/kindergarden08/demo/rund.zip Requires a newer card and breaks horribly on non-supported cards. If you have a <=DX9 card I would love to supply a debug version. It uses NPOT and really nothing else but high polys. BernieLomax fucked around with this message at 00:06 on Nov 23, 2008 |
# ¿ Nov 22, 2008 23:41 |
|
As far as I remember, for clamped texturing the speed is almost the same since you avoid a mod for every texture lookup.
|
# ¿ Dec 16, 2008 01:05 |
|
This might sound silly, but I got this to work by setting the desktop to 16 bit on my really crap computer. Wild guess?
|
# ¿ Dec 18, 2008 12:06 |