Merge pull request #26567 from clayjohn/pixel_snap_artifact

Fixed pixel snap precision artifact
This commit is contained in:
Rémi Verschelde 2019-03-04 16:58:08 +01:00 committed by GitHub
commit b753223ac2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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