开发者

Water simulation using shaders in WPF

开发者 https://www.devze.com 2023-04-01 22:43 出处:网络
I am searching for a way to implement a water effect for in WPF like the one demonstrated on Lee Whitney\'s blog. This is for a full screen application so it should rely on shaders in order to utilize

I am searching for a way to implement a water effect for in WPF like the one demonstrated on Lee Whitney's blog. This is for a full screen application so it should rely on shaders in order to utilize the GPU.

So far I have found the following methods & code examples:

  • WPF: This example does not live up to the requirements of simulating drops of water, as it renders one single water ripple. However it performs lightning fast as it uses shaders. I tried to add several layers of ripples on开发者_JAVA技巧 top of each other but that did not look right either.
  • Silverlight: This implementation offers the right features in terms of simulating drops and their interaction as opposed to rendering one ripple. However it does not perform well at all. I suspect the example may not use the GPU at all but calculates every pixel of the bitmap in software. I may have misunderstood the code though as I am not strong in silverlight
  • [C++]: This example is similar to the silverlight example. It performs a lot faster, but when scaled to a full HD size it gets too slow. As with silverlight it appears to me that the example is relying heavily on software calculations.
  • Windows Surface appear to have a similar effect implement in their pond application. God knows how they did it.

Any ideas?


Take a look at this amazing lib. http://perspectivefx.codeplex.com/


Not really an answer, but look at this WPF Shaders

I'm learning too, and found this resource, hope this helps you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号