WPF 上的元胞自动机

发布于 2024-08-02 19:54:06 字数 228 浏览 1 评论 0原文

目前我正在攻读计算机科学硕士学位课程,我想在 WPF 中实现元胞自动机。渲染性能必须足够显示 包含 200,000 个单元的格子(网格)。

由于在 WPF 中更新视觉效果非常慢(由于视觉和逻辑树),因此也许最好使用旧的良好 Picturebox (GDI+) 进行渲染,并使用 WPF 来实现软件的其余部分。第二种选择是使用像素着色器(HLSL),但我不知道 WPF 是否支持多通道着色器。

让我知道你的想法。

currently im taking a Master degree course in Computer Sciences, and i´d like to implement a Cellular Automata in WPF. The rendering performance must be enough to display
a lattice (grid) containing 200,000 cells.

Since updating visuals is very slow in WPF (due to the visual and logical tree), maybe it's better to use old good Picturebox (GDI+) to do the rendering and WPF to implement the rest of the software. A second option would be to use pixel shaders (HLSL), but i'dont know if WPF supports multi-pass shaders.

Let me know what you think.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔少女心 2024-08-09 19:54:06

首先,查看 WriteableBitmap 。性能还不错,但远非着色器所能提供的。我不太确定支持哪种着色器,但我认为它不会受到限制...

在 WindowsClient 上找到了这个,目前似乎不支持多通道着色器。同样,这可能只是时间和对该代码的需求问题;它可能是在文章撰写后添加的。

有人因为我没有提到生命游戏而对我+1。

First, check out the WriteableBitmap. The performance is decent, but nowhere near a shader can provide. I'm not exactly sure what kind of shaders are supported, but I'd think it wouldn't be limited...

Found this over on WindowsClient, it doesn't seem like multipass shaders are supported currently. Again, its probably just a matter of time and demand on that code; it may have been added since the article was written.

Somebody +1 me for not mentioning the Game of Life.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文