Closed yxdtg closed 3 months ago
Hello, you were very unfortunate because in both of your attempts, the filter change were overwritten by page.setTexture
.
page.setTexture
invokes spineTexture.setFilters
by using the filter set on the spineTexture
(by default Nearest
).
If you swapped these two lines:
spineTexture.setFilters(spine.TextureFilter.Nearest, spine.TextureFilter.Nearest);
page.setTexture(spineTexture);
Your code would have worked.
If you want to make Nearest
the default one, just change the two lines above like this:
page.minFilter = spine.TextureFilter.Nearest;
page.setTexture(spineTexture);
One additional thing. By default the page filter is Nearest
. However, this value is set durint the txt atlas parsing. If you open your atlas, I'm sure that your atlas pages has the following line:
filter:Linear,Linear
During the atlas parsing this set the minFilter
and magFilter
to Linear
(magFilter
is not used by pixi).
So, you could just change that.
I have set the texture's scale filter mode to NEAREST, but the effect remains LINEAR. I also tried
spineTexture.setFilters(spine.TextureFilter.Nearest, spine.TextureFilter.Nearest)
, but it still has no effect. Could you please advise?