Monday, May 7, 2012

Smooth Sensation

The shader for characters and projectiles now approximates motion blur.  This is achieved by approximating the effect of a much higher framerate than possible.  The transformation matrices of the current and previous frame are interpolated and used to draw each character transparently 5 times.  No z buffer writing is used, which allows the 5 draws to combine and fortunately Unity can draw transparent objects in back to front order.  If the game is running at the full 60 fps, this means that a 300 fps presentation is simulated.  Projectiles in particular look better since they move the fastest.  The effect can be seen just by spinning around though.  Another implication of this technique is that no character is fully opaque.  However, I think I like this look better, particularly for the tetrahedron shaped enemies.  I made a couple of other changes as well, such as reducing the trigger range of the player's attack so that you have to get closer to enemies.

You can see the effect in the video, although the actual game is a bit smoother, assuming your PC has the specs.

Video:



Download (Mediafire)

Saturday, May 5, 2012

Play Misty For Me

I changed the fog implemented by my shader a little.  Instead of constant fog everywhere, there is only a mist along the ground.  This seems to look a little better, adding an extra detail to the view as well as an extra height cue.  Things above the mist still fade to black.  I had to put a large plane in front of the player camera to render the mist when there are no objects around.

Video:




Standalone Windows Download (Mediafire).  I'm only providing a standalone link this time since the Webplayer performs slightly worse, even on my relatively new system.  Edit: Fixed the link.