我见过许多像素着色器效果示例,例如图像上的漩涡。但我想知道是否有人知道有关着色器效果的更实际用途的任何示例或教程?
我并不是说漩涡效果没有它的用途,只是我发现的许多示例都解释了基本效果,并且没有深入探讨如何巧妙地将其与另一种效果一起使用或过渡到产生奇妙的效果。 此处有一个视频,概述了所有 WPF 效果库,但我不是确定我将如何在实际环境中使用其中一些。
例如,当 Flash 8 推出模糊等效果时,我发现了一个精彩的视频,展示了如何使用模糊效果来创建带有超速文本的炫酷效果,该视频激发了我如何使用 Flash 中的效果的许多想法8.我正在寻找与像素着色器效果类似的东西。
I've seen a number of pixel-shader effect examples, stuff like swirl on an image. But I'm wondering if anyone knows of any examples or tutorials for more practical uses of shader effects?
I'm not saying that a swirl effect doesn't have it's uses, it's just that many of the examples I've found have the basic effect explained and don't go into how it might be used subtly with another effect or transition to produce a wonderful effect. There's a video here, that outlines all the WPF Effects Library, but I'm not sure how I would use some of them in a practical context.
For example, when Flash 8 came out with effects like blur, I found a wonderful video that showed how to use the blur effect to create a cool effect with speeding text, that video inspired many ideas of what I could do with the effects in Flash 8. I'm looking for something similar with Pixel Shader Effects.
发布评论
评论(2)
像素着色器效果实现的一项实用功能是混合模式。
查看 Robby Ingebretsen 关于此事的帖子(讨论了利用线性燃烧混合模式的有用方法)。关于此主题还有一个 StackOverflow 问题。
事实上,我实际上已经为WPF和WPF编写了一个混合模式库。 Silverlight,并在我的博客上免费提供它。以下是我所有混合模式帖子的列表(所有帖子均附有源代码和二进制文件):
希望这能激发您的想象力...如果您在使用该库,请告诉我!
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!
我在不同的环境中使用过像素着色器。主要是为了让用户惊叹。
这是我的两个例子。 Silverlight/WPF 中的精灵效果:现场演示
替代文本 http://img121.imageshack.us/img121/6074/genied.jpg
网络摄像头支持当您将 Silverlight 4 与着色器结合使用时,它会给您带来无尽的乐趣。比尔盖茨的脸出现在白色的表面上,让与会者感到惊讶。我在网络摄像头旁边设置了手电筒,然后...
替代文本 http://w2.com.ua/files/tinymce/images/Analytics/IT%20Jam%20/.thumbs/4bd67c03d4553251a72a01256fd9e61f_600_0_0.jpg
网络摄像头应用程序也可在此处使用:现场演示(您需要 Silverlight 4 运行时 和网络摄像头)。
令用户惊叹的绝对不仅仅是使用着色器的方式。你也可以在 GPU 上进行一些成本高昂的微积分,但我找不到任何好的现实例子。如果您是游戏开发人员(我不是),您可能每天都会使用着色器。
至于实际用途的解释,网上没有太多,特别是 WPF/Silverlight 技术。人们应该浏览相邻的主题,从 HLSL 语言规范< /a> 并以 flash 像素弯曲器 结尾。以下是一些很好的入门参考:
我还详细描述了我如何创建精灵效果,但仅提供俄语解释。
据我所知,WPF 控件中没有内置着色器的用法。
希望这有帮助:)。干杯。
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.