Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Depth texture render to the depth buffer

10 views
Skip to first unread message

Athanasios Mantes

unread,
Nov 20, 2009, 12:25:17 PM11/20/09
to
Hi all,

I have created a depth texture from the contents of the entire depth
buffer of my opengl scene. Is it possible to "render" a quad textured
with this depth texture back to the depth buffer? I came up some
tutorials mentioning that it is possible to put the depth values stored
in a depth texture back to the depth buffer using glDrawPixels, but I
need a faster way. What I'm trying to accomplish, is to restore depth
values stored to a depth texture back to the depth buffer, without
manipulating pixels. Can't it be done somehow?

Thanks in advance

ThM

Cathy

unread,
Nov 20, 2009, 1:08:44 PM11/20/09
to
Athanasios Mantes a écrit :

Have a look there:
http://groups.google.com/group/comp.graphics.api.opengl/browse_thread/thread/e13718a713bc347b
Fungus gave the answer to this question there.
Hope this help
Cathy L.

John Tsiombikas

unread,
Nov 20, 2009, 2:59:39 PM11/20/09
to

Yes, you can write a shader that outputs to gl_FragDepth.

--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/

0 new messages