View Issue Details

IDProjectCategoryView StatusLast Update
0005617Spring engineGeneralpublic2017-06-22 17:11
ReporterDeinFreund Assigned ToKloot  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version103.0 +git 
Summary0005617: Unit icons have very sharp (aliased) edges
Descriptionhttp://i.imgur.com/0pEmrTz.png
http://i.imgur.com/xqj8fze.png

Steps To Reproducebuild 1048, win32, 2560x1440 resolution, nvidia proprietary gfx.
TagsNo tags attached.
Attached Files
screen00000.jpg (Attachment missing)
Checked infolog.txt for Errors

Activities

DeinFreund

2017-06-22 00:20

reporter   ~0017861

My springsettings are:

FSAA = 1,
FSAALevel = 2,

Units and terrain is properly anti-aliased.

DeinFreund

2017-06-22 00:24

reporter   ~0017862

Full settings in json:
http://paste.springfiles.com/view/5ad6bcd4

And an infolog if that helps:
http://paste.springfiles.com/view/d06318d1

Kloot

2017-06-22 00:33

developer   ~0017863

set FSAALevel = 6 (or larger) to enable A2C sampling for icons.

DeinFreund

2017-06-22 00:39

reporter   ~0017864

Level 8:
1: https://i.imgur.com/TssAX3m.png
2: https://i.imgur.com/05E2sOG.png

Especially on the second image there is still no AA going on. The icon has a sharp edge from black to map color. I would expect the edge to be mixed map color/icon color.

But there seems to be some other rescaling algorithm that is causing the images to be more blurred now.

What is A2C?

Kloot

2017-06-22 01:19

developer   ~0017865

Last edited: 2017-06-22 01:25

tested locally with 1048 (1440x900 res), my icons look the same as yours at level 8.

however they also look no different than in 103.0 (or even 98.0) so it's not an engine regression. afaics the rendering for energysolar matches 1:1 with https://github.com/ZeroK-RTS/Zero-K/blob/master/icons/energy_med.png which hasn't been touched in years.

DeinFreund

2017-06-22 12:03

reporter   ~0017866

In this case consider this a feature request. It's just something that seemed striking after coming back to Spring from other games, adding to the dated look.

DeinFreund

2017-06-22 12:06

reporter   ~0017867

Oh so maybe this is actually a fault of the uniticons and if they'd use partial transparency at the border pixels it'd look smooth?

Kloot

2017-06-22 12:26

developer   ~0017868

yes.

a binary alpha channel creates this effect, similar to https://springrts.com/phpbb/viewtopic.php?f=13&t=30332

DeinFreund

2017-06-22 12:43

reporter   ~0017869

I've replaced the icon by a higher resolution version. This definitely helps by avoiding upscaling, but isn't correctly antialiased either.

https://i.imgur.com/0sjGx7S.png
On the right I've marked the pixels red that I'd expect to be more transparent.

Here's the icon used, as you can see it's perfectly smooth with an antialiased border:
https://i.imgur.com/lRa9mJF.png

I also wouldn't mind if one could simply render the icon ingame at 1:1 resolution, so the antialiasing is done in the image editor. I'm not sure if that's possible or makes any sense.

DeinFreund

2017-06-22 12:46

reporter   ~0017870

Are unit icons limited to binary alpha? Then they'd never look smoth.

DeinFreund

2017-06-22 12:49

reporter   ~0017871

http://zero-k.info/Forum/Post/175663#175663 seems to confirm binary alpha.

Kloot

2017-06-22 12:53

developer   ~0017872

Last edited: 2017-06-22 13:10

engine code still uses a binary test (which only passes samples with alpha > 0.5), wait a few hours.

the icon texture magnification filter might also need adjustment, seems to be nearest.

edit: https://springrts.com/mantis/file_download.php?file_id=3501&type=bug

Kloot

2017-06-22 17:11

developer   ~0017873

Fix 68344e1f0c9e1a3f1b5ebbc2c67c74f573d40737 committed to develop branch: fix 0005617 (enable non-binary AT for unit icons), repo: spring changeset id: 8431

Issue History

Date Modified Username Field Change
2017-06-22 00:15 DeinFreund New Issue
2017-06-22 00:20 DeinFreund Note Added: 0017861
2017-06-22 00:24 DeinFreund Note Added: 0017862
2017-06-22 00:33 Kloot Note Added: 0017863
2017-06-22 00:39 DeinFreund Note Added: 0017864
2017-06-22 01:19 Kloot Note Added: 0017865
2017-06-22 01:21 Kloot Note Edited: 0017865
2017-06-22 01:25 Kloot Note Edited: 0017865
2017-06-22 12:03 DeinFreund Note Added: 0017866
2017-06-22 12:06 DeinFreund Note Added: 0017867
2017-06-22 12:26 Kloot Note Added: 0017868
2017-06-22 12:43 DeinFreund Note Added: 0017869
2017-06-22 12:46 DeinFreund Note Added: 0017870
2017-06-22 12:49 DeinFreund Note Added: 0017871
2017-06-22 12:53 Kloot Note Added: 0017872
2017-06-22 13:09 Kloot File Added: screen00000.jpg
2017-06-22 13:10 Kloot Note Edited: 0017872
2017-06-22 17:11 Kloot Changeset attached => spring develop 68344e1f
2017-06-22 17:11 Kloot Note Added: 0017873
2017-06-22 17:11 Kloot Assigned To => Kloot
2017-06-22 17:11 Kloot Status new => resolved
2017-06-22 17:11 Kloot Resolution open => fixed