Re: OpenGL Shadows
Re: OpenGL Shadows
- Subject: Re: OpenGL Shadows
- From: "Alastair J.Houghton" <email@hidden>
- Date: Mon, 20 Oct 2003 17:32:18 +0100
On Monday, October 20, 2003, at 10:04 am, Gerriet M. Denkmann wrote:
I have an OpenGL scene with objects and shadows on a plane floor.
But depending on the view angle, I sometimes get a rather patchy and
ugly mixture of shadow and floor (depth test is on).
My current fix is to move the floor a few millimeters down, so that
the shadows (and the objects) actually hover some millimeters above
the floor.
This works and the mis-placement of the floor is not detectable. But
is somehow feels like an ugly hack.
So: what is the real and elegant solution to put shadows on a floor?
No offence, but this list is about Cocoa, not OpenGL. You'd be *much*
better off asking your question on an OpenGL list or even in the Usenet
group comp.graphics.api.opengl, if only because people who read those
lists/newsgroups will know much more about OpenGL :-)
From what little *I* know of OpenGL programming, your "ugly hack" is in
fact standard practice for things like decals, shadows etcetera (at
least, where they are rendered by drawing additional polygons against
the wall/object to which they are attached), because of z-buffer
inaccuracies, which cause the kind of problem you're complaining about.
Kind regards,
Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >OpenGL Shadows (From: "Gerriet M. Denkmann" <email@hidden>) |