Sign in to follow this  
vcGamer

the best FOG

Recommended Posts

hi friends I've made a big terrain which is sorrounded by some mounts, and now I want to add more atmosphere to my scene, I suppose fog is a great option, I've also other objects such sky dome, a flag, some towers and etc. how should I implement fog? using pixel shader? vertex shader? which object should be used? terrain, sky? or the entire scene? where can I great sample (plus source code of course) demonstrating the fog effect? thanks in advance

Share this post


Link to post
Share on other sites
Fog can be quite good, but if you haven't put sky in yet I'd highly recommend that... obviously it depends how good you make it, but I've seen some very impressive demo's where the sky/clouds/sunlight REALLY added to the "believability" of the overall scene [grin]

There used to be a demo in the SDK of all the various built in per-vertex fog modes, but I don't think it exists anymore [sad] However, it does still exist as part of the fixed function pipeline - it's configured by a few of the basic render states:

D3DRS_FOGENABLE
D3DRS_FOGCOLOR
D3DRS_FOGTABLEMODE
D3DRS_FOGSTART
D3DRS_FOGEND
D3DRS_FOGDENSITY
D3DRS_RANGEFOGENABLE


Are the important ones from what I remember, check them out in the documentation for details.

hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this