Re: OpenGL Shadows
Re: OpenGL Shadows
- Subject: Re: OpenGL Shadows
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 20 Oct 2003 22:20:40 +0200
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?
To answer my own question: I found a solution, which is real and maybe
elegant:
disable depth buffer
draw floor
enable depth buffer
draw shadows
disable colour buffer
draw floor
enable colour buffer
draw other things ...
Kind regards,
Gerriet.
_______________________________________________
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.