C++着色器问题

发布于 2024-09-26 21:16:39 字数 419 浏览 2 评论 0原文

有人知道我在哪里可以找到着色器(HLSL / CG / GLSL / 后端独立)类的示例吗?

当然,标准 API(例如 D3DXEffectGL 中的相同)存在,但它有点丑陋,不是我想要的。

我正在寻找高质量的界面设计,而不是“只是另一个实现示例”

理想情况下是意识形态上接近的东西boost:: 基于模板的库,“适合”不同的使用场景。

如果有人遇到类似的事情(好吧,如果还没有完成,我会抓住这个想法并自己重新实现它)。如果您对着色器概念设计有任何想法,我们也将不胜感激。

谢谢。

Does somebody know where I can find a sample of shader (HLSL / CG / GLSL / Backend-independent) class?

Of course, standard API (like D3DXEffect or same in GL) exists, but it's kind of ugly and not what I'm looking for.

I'm looking for a high-quality interface design, not "just yet another implementation sample".

Ideally something ideologically close to boost:: template-based library and "suitable" for different usage cases.

If someone met something similiar (OK if it's not finished, I'm just going to grab the idea and reimplement it myself). If you have any ideas on a shader concept design, this is also appreciated.

Thank you.

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

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

发布评论

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

评论(2

小嗲 2024-10-03 21:16:39

目前尚不清楚您是否想要自己重新实现着色器,或者是否需要加载/使用着色器的代码。假设是后者,您可能想查看我在此发布的代码

It's not clear whether you want to re-implement shaders on your own, or whether you want code that load/use shaders. Assuming the latter, you might want to look at the code I posted in this previous answer. I've found it quite useful (and pretty easy to use).

后eg是否自 2024-10-03 21:16:39

我为光线追踪器编写了一个着色语言虚拟机。我开发它主要是为了支持通常在无纹理表面上完成的基本操作,但我认为这对您来说还不够。您可以下载我的语言的手册 此处

如果您认为您感兴趣,我可以给您代码(用 C/C++ 编写)或一些提示。

I wrote a shading language virtual machine for a ray-tracer. Mainly I developed it to support basic operations that are usually done over un-textured surfaces but I don't think it's enough for you.. You can dowload the manual of my language here.

If you think you are interested I can give you the code (written in C/C++) or some hints..

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