Moonlight Leaps Ahead of Silverlight with Hardware Accelerated Pixel Shaders
Hardware Acceleration is a major topic these days. With CPU speeds barely increasing each year and high powered graphics cards coming standard on most computers, rendering complex user interfaces on the CPU seems downright stupid. But for cross-platform frameworks like Silverlight, the expense of building out DirectX support and then doing it all again for OpenGL hasn’t been worth it to Microsoft. So while WPF enjoys a UI that is almost entirely rendered on a GPU, Silverlight primarily uses highly optimized software rendering.
Recently David Reveman added hardware rendering to Novel’s Moonlight. Using Moonlights CPU rendering, one demo got between 2 and 9 frames per second. With acceleration turned on, the rate was increased to a range of 29 to 35 FPS. These ranges for CPU and GPU rendering are comparable to a Windows machine running Silverlight.
The real win for Moonlight is when you turn on custom shaders. Since Silverlight doesn’t accelerate most pixel shaders, turning them on during the demo dropped it down to around 11 FPS. Moonlight, on the other hand, continued to run around 30 FPS.
In addition to pixel shaders, Miguel de Icaza reports that Moonlight can use hardware acceleration for applying 3D transforms to any Silverlight objects (drawings, images, videos) and the rendering of surfaces by pre-caching the contents on hardware textures.
Olav Maassen, Liz Keogh & Chris Matts Mar 08, 2014