Sunday, November 28, 2010

Controlling a Pixel shader’s parameters with reflection

Introduction
Currently I’m working on an image editor, which will use Pixel Shader effects. To save a lot of time manually hard coding each effects control interface I built a simple reflection based controller system for the effects. This article shows the technique behind it. This is my first article that I publish here on CodeProject.

The Code
Reflection controll is achived using a few custom atributes. The reflection code looks for these atribuites, and depending on the contained information of the atributes it builds the user interface.

Read more: Codeproject