There's 2 types of DOF in GMod..
The simple one just places a bunch of quads from the player's eyes along the
eye angles. Every time it draws one it updates the refraction buffer. This
works, but has issues with transparency I think. You don't get any
foreground blur either.

The other one is done by rendering the scene multiple times into a floating
point buffer, while rotating very slightly around an origin. You get a much
smoother effect with that one - but obviously it isn't realtime.

The sunflares is just a post process shader I wrote that explodes the light
from a certain point on the screen..

garry

On Tue, Apr 28, 2009 at 6:29 PM, Michael Corsaro <[email protected]> wrote:

> How did you implement DoF and the Sun Flares?
>
> On Tue, Apr 28, 2009 at 9:02 AM, Garry Newman <[email protected]>
> wrote:
>
> > Do what?
> > Anything I've done, all you've gotta do is ask and I'll tell you how I've
> > done it.
> >
> > garry
> >
> > On Tue, Apr 28, 2009 at 6:04 AM, Cory de La Torre <[email protected]
> > >wrote:
> >
> > > Minh's got it right ;D Like Garry had ever released how to parent the
> > > projector, amirite.
> > >
> > > On Mon, Apr 27, 2009 at 8:10 PM, Stephen Micheals <
> > > [email protected]> wrote:
> > >
> > > > Staying on topic a bit wasn't the grain in the shadows introduced by
> > > > valve because of nvidia (forcing a cheaper version to be used) cards
> > > > that could not handle the newer flashlight effect in EP2 without lag?
> > > >
> > > > On Mon, Apr 27, 2009 at 4:00 PM, James Keith <[email protected]>
> > > wrote:
> > > > > Once again, thanks for the totally-explaining-how-to-do-it post...
> > > >
> > > > _______________________________________________
> > > > To unsubscribe, edit your list preferences, or view the list
> archives,
> > > > please visit:
> > > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > > >
> > > >
> > >
> > >
> > > --
> > > Gear Dev
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to