Re: [Algorithms] Shadowbuffers - ID + depth
Brought to you by:
vexxed72
From: Paul at H. <pa...@ru...> - 2007-05-30 23:30:32
|
I think it's about time some kind soul presented this as working code in one of the gems/shaders books, if anyone's up to the challenge. I nearly volunteered my own code but I'm sure their must be a cheaper implementation than what I came up with. Regards, Paul Johnson. www.rubicondev.com ----- Original Message ----- From: "Paul at Home" <pa...@ru...> To: "Game Development Algorithms" <gda...@li...> Cc: <gda...@li...> Sent: Thursday, May 31, 2007 12:19 AM Subject: Re: [Algorithms] Shadowbuffers - ID + depth >I implemented this a couple of weeks ago. The code's been deleted now as >the > shader for doing all of that, plus some PCF, generated a shader so big I > was > amazed even a single light fitted in the SM3 limit. It had a massive > impact > on my fillrate so it's gone. Don't forget I'm doing multiple lights in one > shader. > > One thing that gets overlooked is that the ID buffer method isn't as cheap > as it looks in reality. If you want pcf and rugged protection from seep > through at grazing angles, you're taking about a boatload of samples right > there. Add that to the depth pcf which is done differently and blend the > two > together. > > I first read about this idea in Tom's paper from GDC, but since > implementing > it, I've gone back to one or the other. I may revisit this one day, but > I'm > bored to death with it now tbh. > > > Regards, > Paul Johnson. > www.rubicondev.com > ----- Original Message ----- > From: "Jon Watte" <hp...@mi...> > To: "Game Development Algorithms" > <gda...@li...> > Cc: <gda...@li...> > Sent: Wednesday, May 30, 2007 11:00 PM > Subject: Re: [Algorithms] Shadowbuffers - ID + depth > > >> >> >> Paul at Home wrote: >>> Of course one problem with ID buffers that's just presented itself. >>> You can't have an object receive a shadow if it doesn't cast one, as >>> the lack of ID in the buffer will return "all shadowed". I guess I'm >>> wasting a shitload of fillrate on my water plane then! >>> >> >> The popular way these days seems to be do use both depth and id in the >> same buffer. You can implement this as RG32 or RG16 if you're fancy, or >> as various combinations of RG/BA if you're old-skool. >> >> The idea is to set up a near/far depth range per object when it's >> rendered into the shadow map, so that the limited depth range available >> is scaled across the object, not across the scene. Then you first do the >> ID test, if you get a match, you do a secondary depth test. >> >> Tom Forsyth has a pretty good (almost canonical) write-up of the >> technique on his web site: >> http://home.comcast.net/~tom_forsyth/blog.wiki.html >> Which, in turn, points out a pre-dating article in Game Programming Gems >> 4. >> >> Cheers, >> >> / h+ >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> GDAlgorithms-list mailing list >> GDA...@li... >> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list >> >> >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > > > > |