Pixel Shader Effect Examples

不羁岁月 提交于 2019-11-30 03:57:17

I've used pixel shaders in different contexts. Mostly to wow users.

Here are two examples from me. Genie effect in Silverlight/WPF: live demo

alt text http://img121.imageshack.us/img121/6074/genied.jpg


Webcam support in Silverlight 4 gives you endless fun, when you combine it with shaders. I surprised a conference attendees with Bill Gates face, appearing on white surfaces. I set a flashlight next to webcam and...

alt text http://w2.com.ua/files/tinymce/images/Analytics/IT%20Jam%20/.thumbs/4bd67c03d4553251a72a01256fd9e61f_600_0_0.jpg

Web cam application is also availble here: live demo (you'll need Silverlight 4 runtime & web cam).

Wowing users is definitely not only way to use shaders. You could also do some costly calculus on GPU, but I can't find any good real-life example. And if you are a game developer (I'm not) you probably use shaders on a daily basis.


As for practical uses explanation there is not much in the Net, specifically to WPF/Silverlight technologies. One should go through adjacent topics, starting from HLSL language specification and ending with flash pixel bender. Here are some good references to start:

I also described in details how I created Genie effect, but explanation is available only in Russian.


There are no build-in usage of shaders in WPF controls, as far as I know.

Hope this helps :). Cheers.

cplotts

One practical thing that pixel shader effects enable ... are blend modes.

Check out Robby Ingebretsen's post on the matter (which discusses a useful way to take advantage of the linear burn blend mode). There is also a StackOverflow question on this subject as well.

In fact, I actually have written a blend mode library for WPF & Silverlight, and make it freely available at my blog. Following is a list of all my blend mode posts (all of which have source code and binaries attached):

Hope this sparks your imagination ... and let me know if you toy around with the library!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!