Okay, I’m really going to need some help with this artifact issue, I’ve tried every trick I’ve found online. I’ve clamped the U. I’ve clamped the V. Using point
looks extremely low quality compared to the exported asset from photoshop. linear
looks exactly like photoshop, but has these artifacts that are driving me nuts. We’re getting close to launching and these minor details are really bad for the look.
(https://gyazo.com/3cbb15f0a59ac77645ced0c6c45e0b55.png
You can see an example of the artifacts on the left of the ring, here: https://gyazo.com/0150e91b64fe72c9c87fd16280917784.png also on some points on the weapons and definitely anything founded, like this orb on a staff https://gyazo.com/19d34eb86c129237489e112cd74ce7e0.png
Another SS: https://gyazo.com/b24792887d041417d7fef6c1b33e8b87.png
https://gyazo.com/b24792887d041417d7fef6c1b33e8b87.png
I’m using linear
because it looks so much better than point
. Our textures are 256x256
in non-compressed
png format. We have spritesheets that are 1024x256
which contain 4 sprite layers. The textures are loaded at runtime and given CLAMP_TO_EDGE
and FILTER_LINEAR
asset.resource.addressV = pc.ADDRESS_CLAMP_TO_EDGE;
asset.resource.addressU = pc.ADDRESS_CLAMP_TO_EDGE;
asset.resource.magFilter = pc.FILTER_LINEAR;
asset.resource.minFilter = pc.FILTER_LINEAR;
We then take the texture and create an atlas and 4 sprites from it.
CharacterAssets.prototype.processAsset = function(texture) {
var sprites = [];
var atlas = new pc.TextureAtlas();
atlas.frames = {};
atlas.texture = texture;
for(var i = 0; i < (texture.width / 256); i++) {
atlas.setFrame(i, {
rect: new pc.Vec4(256 * i, 0, 256, 256),
pivot: new pc.Vec2(0.5, 0.5),
border: new pc.Vec4(0, 0, 0, 0)
});
sprites.push(new pc.Sprite(this.app.graphicsDevice, {
pixelsPerUnit: 100,
atlas: atlas,
frameKeys: [i],
renderMode: pc.SPRITE_RENDERMODE_SIMPLE
}));
}
return sprites;
};
I’ve tried every filtering mode available, but I haven’t found a way toget rid of those weird white lines without using NEAREST/POINT, which makes the designs look terrible.