没有“像素捕捉" "Sprite-Lit-Default"材质中的选项会导致某些精灵撕裂 [英] No "Pixel Snap" option in 'Sprite-Lit-Default' material causing some sprites to tear

查看:643
本文介绍了没有“像素捕捉" "Sprite-Lit-Default"材质中的选项会导致某些精灵撕裂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:

我有一个基于像素艺术的项目,该项目使用tilemaps等.以前,仅使用默认材质Sprites/Default,我使用了像素捕捉"功能.选项:

I have a pixel-art based project that uses tilemaps and etc. Previously with just the default material Sprites/Default, I have this "Pixel Snap" option:

但是,自从我升级到LWRP/URP以来,并使用2D灯光(我的游戏有昼/夜循环);所有的精灵都必须升级为新的Sprite-Lit-Default材质,这样我的精灵才能受到2D灯光的影响.我在这种新材料中注意到的唯一问题是,它没有任何"Pixel Snap"像素.选项:

However, ever since I upgraded to LWRP/URP; and used 2D Lights (my game has a day/night cycle); all of the sprites have to be upgraded to a new Sprite-Lit-Default material which allows my sprites to be affected by the 2D Lights. The only problem I noticed in this new material is that it hasn't got any "Pixel Snap" option:

在我使用了这种新材料之后,我注意到我的一些精灵(特别是Tilemaps上的精灵)撕裂了.它不是破坏游戏,有时会发生,但是确实很烦人(让我们面对现实,游戏中有该错误看起来很糟糕).

And after I used this new material, I notice some of my sprites (specifically the ones on the Tilemaps) tear. It's not game breaking and it occurs sometimes, but it's really quite annoying (and let's face it, it looks bad for your game to have that bug).

我只在磁贴地图上才注意到我其他精灵(玩家,树木,障碍物等)上的撕裂错误.

I haven't noticed this tearing bug on my other sprites (player, trees, obstacles, etc) only particularly on the tilemaps.

我到目前为止所做的事情:

  • 我的子画面设置为点"(无过滤器),压缩"设置为无".在我的图块精灵上,没有透明的边缘等.即使我使用Unity的Pixel Perfect Camera,问题仍然存在.

  • My sprites are set to Point (no filter), and Compression is set to None. On my tile sprites, there are no transparent edges etc. Even if I use Unity's Pixel Perfect Camera, the problem is still there.

复制了我的图块地图,并将其他图块在其X轴上偏移到-0.01或-0.02(以防万一它会撕裂,玩家仍然会看到相同的图块地图).

Duplicated my tilemaps and offset the other ones to -0.01 or -0.02 on its X axis (so just in case it would tear, the player would still see the same tilemap).

到目前为止,这些东西都没有解决问题.

None of these things have fixed the problem so far.

有什么方法可以绕过/解决此问题? 非常感谢!

Are there any ways to bypass/fix this issue? Thanks a lot!

推荐答案

这篇关于没有“像素捕捉" "Sprite-Lit-Default"材质中的选项会导致某些精灵撕裂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆