RE: [Algorithms] view dependant fog error
Brought to you by:
vexxed72
From: Tom F. <tom...@ee...> - 2004-04-24 03:14:11
|
Indeed - see the docs on D3DRS_RANGEFOGENABLE for example. However, fog is a special-cased hack (and not a very good one at that) = that will go away shortly and be entirely replaced by just doing whatever = shader instructions you feel like to get a similar effect. TomF. > -----Original Message----- > From: gda...@li...=20 > [mailto:gda...@li...] On=20 > Behalf Of Ignacio Casta=F1o > Sent: 23 April 2004 17:38 > To: gda...@li... > Subject: Re: [Algorithms] view dependant fog error >=20 >=20 > Hi Ian, >=20 > Depth fog is sometimes preferred over distance fog, because depth=20 > changes linearly along triangles, while distance does not. For this=20 > reason depth fog is independant of tesellation. Distance fog=20 > can cause=20 > artifacts on meshes with low tesselation or during lod changes. There=20 > are OpenGL extensions to switch between the two, and I wouldn't be=20 > surprised if Direct3D provided the same feature. >=20 > --=20 > Ignacio Casta=F1o > cas...@ya... >=20 >=20 >=20 > Ian McMeans wrote: > > This is kind of a minor issue, but I thought maybe some=20 > people will be=20 > > interested in it and will fix it in their games. I've noticed it in=20 > > plenty of games, I'm sure other people have noticed it too.=20 > I searched=20 > > the archives in case this had been discussed before, and=20 > found nothing. > > =20 > > The error is how the fog is view-direction-dependant. Look at the=20 > > central tower in this screenshot of ONS-Torlan: > > http://img9.imageshack.us/my.php?loc=3Dimg9&image=3DShot00000.jpg=20 > > <http://img9.imageshack.us/my.php?loc=3Dimg9&image=3DShot00000.jpg> > > =20 > > and then this screenshot, taken facing a slightly different=20 > direction: > > http://img9.imageshack.us/my.php?loc=3Dimg9&image=3DShot00001.jpg=20 > > <http://img9.imageshack.us/my.php?loc=3Dimg9&image=3DShot00001.jpg> > > =20 > > Now, my guess is that it's caused by how the fog is computed using=20 > > depth, and depth in turn is computed based on the view=20 > frustrum. And=20 > > when you're looking at something in the corner of your view=20 > frustrum,=20 > > then the fog is less intense there because the object=20 > you're looking at=20 > > is then further from the far plane. (Sorry if this=20 > explanation isn't too=20 > > clear). > > =20 > > Is it just not worth fixing because it's a minor issue? I=20 > imagine you=20 > > could fix it by weighting the fog based on the view vector=20 > compared to=20 > > the lookat vector, but perhaps the cost in shader=20 > instructions isn't=20 > > worth the benefit in this case. >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=3D12297 > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 >=20 |