如何在轮廓着色器中固定这些空白?
我的游戏为其大多数几何形状都使用非常低的模型,而我当前的大纲着色器会颠倒正常并“缩放”材料,并没有真正削减它。诚然,我在着色器图上几乎没有经验,但是我在这里尽力而为。这些轮廓是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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您制作的着色器需要所有顶点的平滑符号。如果您需要在一个概述的对象上具有边缘,则由于立方体没有光滑的正态,因此将获得以下结果。
您的模型非常低,使其更加明显。
我建议只使用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.
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