2024-04-25 00:08 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005617Spring engineGeneralpublic2017-06-22 17:11
ReporterDeinFreund 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version103.0 +git 
Target VersionFixed in Version 
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.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0017861

DeinFreund (reporter)

My springsettings are:

FSAA = 1,
FSAALevel = 2,

Units and terrain is properly anti-aliased.

~0017862

DeinFreund (reporter)

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

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

~0017863

Kloot (developer)

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

~0017864

DeinFreund (reporter)

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?

~0017865

Kloot (developer)

Last edited: 2017-06-22 01:25

View 3 revisions

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.

~0017866

DeinFreund (reporter)

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.

~0017867

DeinFreund (reporter)

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?

~0017868

Kloot (developer)

yes.

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

~0017869

DeinFreund (reporter)

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.

~0017870

DeinFreund (reporter)

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

~0017871

DeinFreund (reporter)

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

~0017872

Kloot (developer)

Last edited: 2017-06-22 13:10

View 2 revisions

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

~0017873

Kloot (developer)

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

-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 View Revisions
2017-06-22 01:25 Kloot Note Edited: 0017865 View Revisions
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 View Revisions
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
+Issue History