fixed pixel snap precision artifact
This commit is contained in:
parent
8d117b214f
commit
b804c491b7
2 changed files with 6 additions and 0 deletions
|
@ -162,6 +162,9 @@ VERTEX_SHADER_CODE
|
||||||
|
|
||||||
#ifdef USE_PIXEL_SNAP
|
#ifdef USE_PIXEL_SNAP
|
||||||
outvec.xy = floor(outvec + 0.5).xy;
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SKELETON
|
#ifdef USE_SKELETON
|
||||||
|
|
|
@ -173,6 +173,9 @@ VERTEX_SHADER_CODE
|
||||||
|
|
||||||
#ifdef USE_PIXEL_SNAP
|
#ifdef USE_PIXEL_SNAP
|
||||||
outvec.xy = floor(outvec + 0.5).xy;
|
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
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SKELETON
|
#ifdef USE_SKELETON
|
||||||
|
|
Loading…
Reference in a new issue