#Weird gaps between pixels on a pixel art sprite
1 messages · Page 1 of 1 (latest)
Mip maps, or more precisely the way mip mapped texture sampling deals with instant changes in UV coordinate space like with pixelation
so, what should I do about that?
I don't have "generate mipmaps" selected for either
You sure? The right texture asset and applied the change too?
Wait, I'm on autopilot and you're not doing pixelation in the shader
So it's not the same issue
I thing I just fixed the gaps by turning mipmaps on, clicking a bunch of random options, then turning it off 💀
yeah, now the only issue I get is that I need to set a weird offset and still get some blank pixels despite of that
but that might be a problem with the sprite itself potentially, though it worked fine in the blender prototype of the shader
I think UV coordinates when stored as pixels generally point to corners of pixels, so a half pixel offset can be necessary
Not necessarily exactly half if there's no filtering to worry about
i'd think that too, but actual halves of pixels warp pixel placements and I need some nonsense for it to actually map correctly, can't crack why is that
The distance is totally dependent on the real dimensions of the maintex sprite sheet, which can change
But anyway if both your coordinate texture and palette texture have no mipmaps and no filtering / point filtering, the offsets shouldn't be that important
no, I think I got it right, I was applying the offset to the color look up texture based on that textures resolution
well the surprise is that it does actually matter
if I set offset to (0,0) it's all warped
Well, with totally zero offsets I think you're getting the pixel intersections of the palette texture
Which won't work even with pure sharp pixels
okay, but funnily enough an offset like 0.001 in each direction also gives warped results, differently warped than 0
it's madness
for reference, the color lookup texture is 64x64
I did the same kind of thing once before but I don't recall these exact issues
They could be related to your assets, or maybe something I'm not noticing in the graph
If you want to send the relevant assets I can poke at it
alright, thanks
discord didn't want to allow me to send metas
so I couldn't send over my import settings
Could send them as a DM, or just as screenshots
Not sure if they're important in this case
well, probably key info is that they're compression-less and on point filter
I think what's happening is that there's a loss of accuracy because your UV texture is exported in gamma color space
Because it stores coordinates, it should be saved in linear space and import as not "sRGB (color texture)"
In gamma space you get effectively the same coordinates, but with far less accuracy in the upper end, and more in the lower