offscreen - Rendering, anti aliasing

Jun 22, 2010 at 1:41 PM
Edited Jun 22, 2010 at 1:55 PM


I need to implement anti-aliasing to Balder (for silverlight platform) in the way, it could be quickly turned of/on. I plan to use it when nothing in scene is moving, so i doesn't have to be fast.

Ideal solutio would be: When scene is stoped, new thread is started, it render offscreen scene in higher resolution, and than scale it back and copy to framebuffer. This thread is terminated when scene starts moving again.

Not so ideal would be just changing frame buffer size, without the new thread....

I examined the code, but I'am litle bit lost. Could you please show me some direction where to start? Where is ideal place in balder object model to implement something like this? Or is it necessary to alter model somehow to achive this? What do you think?


Jun 22, 2010 at 3:02 PM

The simplest thing would be to use Silverlights built in scaling for this, as it scales with smoothing. So if you were to modify the WriteableBitmapQueue to create a much larger WriteableBitmap and scale it down in the InitializeContainer() were it creates the Image, set the Stretch properties and add a rendertransform (ScaleTransform) to it that scales it to the size you want.


Jun 22, 2010 at 4:18 PM
Thanks a lot! It was easier, than I thought. Using Image {Strech = Stretch.Uniform} and than changing Viewport size and reinicialize display is enough.