Thursday, November 10, 2011

Applying Custom Effects to Silverlight Maps

Larry King

The Larry King effect is many custom map effects available in a newly published sample by the Applications Prototype Lab.

Click here for the live app.
Click here to download the source code.

Background

With the release of Silverlight 3, Microsoft introduced the capability to apply custom effects using pixel shaders.

The ArcGIS API for Silverlight allows developers to assign effects directly to a layer or map. This sample demonstrates the application of custom effects to a map.

Silverlight versions 3 and 4 currently applies effects in software, that is, using the CPU rather than the GPU. On slower computers users may experience a slight delay when navigating or changing effects.

One advantage of this technique is that web developers can extend the utility of standard base maps. For example, a developer could create an effect that would allow the Esri streetmap base map to be more legible at night. Applying effects does not create more content nor impact network bandwidth.

For a technical discussion on pixels shaders for Silverlight we recommend this article.

Below are a few screenshots from the live application linked above.

Inverted
Inverted

Gray
Gray

Saturation/Desaturation
Saturation/Desaturation

Censored
Censored

Embossing
Embossing

Movie
Movie