CustomEffect Sample

This sample demonstrates how to create Custom Effects to do image manipulation both on the CPU and the GPU.

Demonstrated in this sample is how to create:

Managed effects

  1. GPU Pixel Shader Effect
  2. CPU Effect

Native C++ effects

  1. GPU Pixel Shader Effect
  2. GPU Effect wraps an existing D2DEffect
  3. GPU Pixel Shader Effect with TextureEffect
  4. CPU Effect

Compatibility

  • Compatible with Windows 10 and Windows 10 Mobile.
  • Developed with Visual Studio 2015.
  • Compiling the project requires the Lumia Imaging SDK version 3.0

Design

An application launches into a view where a user can select a custom effect for editing. For those effects that support editing of parameters, a slider will be visible for the user to manipulate the parameter. The application also supports the selecting of new images from disk and the saving of the processed image to disk.

Mt598526.CustomEffectSample(en-us,WIN.10).png

Architecture overview

The sample is split up in three parts.

  1. Manage Effects in C#
  2. Native Effects in C++
  3. The sample application that uses the custom effects.

The sample app uses the MVVM pattern to separate the view from its logic.

MainViewModel is where all the effects are set up and the rendering takes place.
CustomEffectViewModel is a wrapper around the effect. The class additional provides a display name and a thumbnail.

See also

Custom sources and effects

Lumia Imaging SDK Git repository

Custom Effect Git project

This example application is hosted at GitHub, where you can check the latest activities, report issues, browse source, ask questions, or suggest changes to the project yourself.

Downloads

Zip-package of Lumia Imaging SDK Samples source code