Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Final Fog

Sign in to follow this  


Final Fog

Hopefully I'm done with the fog for a while. Recently I fixed the last few particles to fog out correctly. The most challenging was the smoke, which used an unusual blend mode :

srccolor * srccolor + invsrccolor * destcolor

Sort of a combination of brightening & darkening. I made it foggable by moving the srccolor^2 into the pixel shader, and fading srccolor.rgb to black, and fading the srccolor.a to white, then blending with :

srccolor + invsrcalpha * destcolor

This way both terms fade out to do nothing in the distance.

In the process of fixing the fog on the particles, I cleaned up some code with the laser bolt and needle particles, and decided to adjust the glow on the needle particle. Turns out this revealed another issue - the spherical glow object drawn around the needle was lagging behind by a frame.

The reason was that the particles are drawn in object type order, so that all needles were updated & drawn after all glow spheres. That caused things to get out of sync. So, I changed it so that objects are now drawn in a different order using a small look-up table to give the new order based on object type. I could have rearranged the object types order instead, but that might have broken some of the existing levels.

This morning I refactored the code handling the fog / depth_cueing texture so that it is automatically generated from
the near & far parameters.

Over the next few days I plan to put in the RPG elements, so you can choose a level, have your character's stats used in the game, the monsters will be somewhat randomized, etc.

Here are some recent shots :

Sign in to follow this  


Recommended Comments

I just wanted to say that I really enjoy reading your journal. You not only tell us what you are working on, but the problems you face and how to get around them -- and some gorgeous screen shots to boot!

Keep at it, mate!

Share this comment

Link to comment
I like the final fog results - subtle and effective. Although, in the last (indoor) screenshot - is it "overdone" particularly to give the general room a smokey/foggy feel?

Is the background image a new things? don't think I've seen any other screenshots with it in.

One minor critiscm though - the textures on the walls for the middle (bridge?) screenshot could really do with some work. They just don't look like they're at the same quality the rest of your art is at [smile]


Share this comment

Link to comment

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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!