Wednesday, 26 December 2012

Graphics Programming - Fog

Hello! Its the Christmas holidays and I've had some time to play about with code in between working the Christmas sales and spending time with my family. One little bit of code i have implemented is fog which i have done by making use of the pixel shader.

After reading up about the different equations that can be used to calculate fog. I choose to implement the equation known as exp2 which is an exponential equation for calculating fog.
Exp2 Equation
No Fog
A Little Fog
Lots of Fog
This equation gives a fairly reasonable effect however the fog is applied to everything across the scene. One thing i would like to get working is so that fog is only applied to certain areas in the scene i belive this could create a nice effect when combined with the terrain.

Here is a little video of me moving around the scene. 


Thanks for reading! Any questions or feedback i would love to hear from you.

Email: 10004794@napier.ac.uk - Please put blog in the subject.
Xbox Gamertag: craigmcmillan01
Twitter: 
steam: craigmcmillan01
add or follow and we can game!

No comments:

Post a Comment