Monday, 11 March 2013

DirectX Terrain Smoothing


If added smoothing into my DirectX. The theory behind it is quite simple. Work out each points height by averaging the neighbouring heights. The problem i had was that the framework works out the height terrain with a single dimensional array instead of a multi dimensional array. So i had to use a triple nested for loop just to get it to work.  One for each pass through the smoothing (the more passes you make the smoother the result is), one for the height and one for the width.

No comments:

Post a Comment