Game Dev : Pixel Bleeding How To Fix It?
Hello, welcome to series of game dev. Today i want to share my experience for fixing the pixel bleeding.
What is pixel bleeding at game dev? is when your game render a some line different color than the others, you can see image below.
Its happened cause your tileset not enough space for GPU for rendering correctly. Sometimes any texture overlap, and then you got the pixel bleed. Its commonly happen at platformer game or top down game wheres used a tile based game. And how to fix it?.You can add more space at your tileset, when your each tile are size 8px x 8px add more space 1 pixel every side. But its take a time, using tile extruder will help you. Tile extruder is tools for adding a margin and spacing at each tile on tileset, you can use this website to perform tile extrude here. Fill the size of your tile and dont forget to add more size of canvas on your tileset image dont fit with tiles, why you should add more size? because when extrude perform the each tile will added 1 pixel space at every side. When your each tile size 8px extruder will make 12px size (4 side) and this for all your tileset. After that fill extrusion amount min is 1, its enough. What is extrusion amount? its automaticly create a spacing and margin, so when you fill extrusion amount dont fill spacing and margin.
What is spacing and margin?, is craete space on your tile, before im explain when you have 8px tile then added more space ad every side, thats it the margin. And between margin at tile called spacing.
![]() |
margin and spacing explain by image |
Thanks
Tags: