mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #26567 from clayjohn/pixel_snap_artifact
Fixed pixel snap precision artifact
This commit is contained in:
commit
b753223ac2
@ -162,6 +162,9 @@ VERTEX_SHADER_CODE
|
||||
|
||||
#ifdef USE_PIXEL_SNAP
|
||||
outvec.xy = floor(outvec + 0.5).xy;
|
||||
// precision issue on some hardware creates artifacts within texture
|
||||
// offset uv by a small amount to avoid
|
||||
uv += 1e-5;
|
||||
#endif
|
||||
|
||||
#ifdef USE_SKELETON
|
||||
|
@ -173,6 +173,9 @@ VERTEX_SHADER_CODE
|
||||
|
||||
#ifdef USE_PIXEL_SNAP
|
||||
outvec.xy = floor(outvec + 0.5).xy;
|
||||
// precision issue on some hardware creates artifacts within texture
|
||||
// offset uv by a small amount to avoid
|
||||
uv_interp += 1e-5;
|
||||
#endif
|
||||
|
||||
#ifdef USE_SKELETON
|
||||
|
Loading…
Reference in New Issue
Block a user