small lines beside roads

Bug #1538709 reported by kaputtnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Low
Unassigned

Bug Description

Roads have small black lines on their edges which should be transparent. We had this already when i created the new roads but i found a workaround by giving problematic roads a width of 12 pixel instead of 10. See https://wl.widelands.org/forum/topic/1627/?page=2#post-12183

Now the roads have this small line again. Attached is a screenshot with current roads (12pixel). Mostly on roads in direction southeast have on both sides this small black line.

I checked also barbarian roads, but those do not have this line as much as empire roads have.

Next screenshot shows the situation when roads have a width of 10 pixel (the width used in program).

Related branches

Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :

Giving a width of 10 pixel to the roads, the line appears only at one side of them.

Revision history for this message
kaputtnik (franku) wrote :

The linked branch contains the 10 pixel roads

Revision history for this message
GunChleoc (gunchleoc) wrote :

I see lines in both screenshots, although 10px is a bit better.

Revision history for this message
SirVer (sirver) wrote :

tweaking the road is just treating the symptomps here. The culprit is that the texture atlas packs all graphics tightly and OpenGL is imprecise when sampling from the texture. Though we pixel perfectly request sampling, due to floating point and rounding, OpenGL sometimes does not sample perfectly in the middle of a pixel and then does interpolation. What you see here is the interpolation with the neighboring image in the texture atlas.

Fixing this will give each image in the atlas a padding of 1 transparent pixel that should fix that for good.

Changed in widelands:
importance: Undecided → Low
milestone: none → build19-rc1
status: New → Confirmed
assignee: nobody → SirVer (sirver)
kaputtnik (franku)
Changed in widelands:
status: Confirmed → Fix Committed
SirVer (sirver)
Changed in widelands:
assignee: SirVer (sirver) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.