如何在轮廓着色器中固定这些空白?

发布于 2025-01-30 15:50:44 字数 275 浏览 4 评论 0原文

我的游戏为其大多数几何形状都使用非常低的模型,而我当前的大纲着色器会颠倒正常并“缩放”材料,并没有真正削减它。诚然,我在着色器图上几乎没有经验,但是我在这里尽力而为。这些轮廓是URP中渲染对象的一部分。

这是有关问题的示例,以及着色器图本身。

img src =“ https://i.sstatic.net/xtsys.png”

< img src =“ https://i.sstatic.net/wrhno.png” alt =“”>

My game uses very low-poly models for most of its geometry, and my current outline shader, which inverts normals and "scales up" the material, doesn't really cut it for this. Admittedly I have very little experience with shader graph but I'm trying my best here. These outlines are part of the Render Objects renderer feature in URP.

Here is an example of the issue in question, as well as the shader graph itself.

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

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

发布评论

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

评论(1

奶茶白久 2025-02-06 15:50:44

您制作的着色器需要所有顶点的平滑符号。如果您需要在一个概述的对象上具有边缘,则由于立方体没有光滑的正态,因此将获得以下结果。

您的模型非常低,使其更加明显。

我建议只使用frensel节点,然后将其连接到台阶节点以获取苛刻的轮廓,您可以将其连接到Emmision或其他内容,因为它可能只需4-5个节点

The shader you made requires smoothed normals for all vertices. If you need to have an edge on one of your outlined objects, you will get the following result with gaps because the cube doesn't have smooth normals.

enter image description here

And your models being very low-poly makes it a lot more visible.

I'd suggest just using a Frensel Node and attach it to a step node to get harsh outlines which you can just connect to emmision or something since it would probably only take 4-5 Nodes

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