简体   繁体   English

Unity - 如何使程序生成的纹理不像素化?

[英]Unity - How to make a procedurally generated texture not pixelated?

I am using procedural world generation in my Unity game, I would like to make the texture on it not pixelated but the tutorial I'm following doesn't show how to fix that.我在我的 Unity 游戏中使用程序世界生成,我想让它的纹理不像素化,但我正在学习的教程没有说明如何解决这个问题。 I tried googling it but no one else seems to know how to fix it.我尝试用谷歌搜索它,但似乎没有其他人知道如何修复它。

This is what it looks like:这是它的样子:

But how can I make it look like:但是我怎样才能让它看起来像:

Links:链接:

Code 代码

Tutorial 教程

Divide the mesh into an X, so the existing four corners and the middle, and then color each wedge (North, East, South, and West) based on neighbor matching.将网格划分为 X,因此存在四个角和中间,然后根据相邻匹配为每个楔形(北、东、南和西)着色。 If neighbors on two adjacent sides share a type (like North and East are both grass) then those corresponding wedges get the same texture as the neighbor.如果两个相邻边的邻居共享一个类型(比如 North 和 East 都是草地),那么那些对应的楔形将获得与邻居相同的纹理。

Right now everything looks pixelated because you're drawing everything as squares.现在一切看起来都是像素化的,因为你把一切都画成正方形。

You could make some transitional textures to apply in the wedges to look really good, and then those would only matter based on individual neighbors.您可以制作一些过渡纹理以应用到楔形中以看起来非常好,然后这些纹理将仅基于个别邻居。

Okay I learned how to use shader graphs and that fixed it for me.好的,我学会了如何使用着色器图并为我修复了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM