View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0005136 | Spring engine | General | public | 2016-03-04 13:59 | 2016-03-07 19:37 | ||||
Reporter | Beherith | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 101.0 | ||||||||
Target Version | Fixed in Version | 101.0+git | |||||||
Summary | 0005136: CustomUnitShaders graphical glitches - loss of tex1 and tex2 | ||||||||
Description | After a few different units, using different texture sets, CustomUnitShaders starts assigning bogus texture1 and texture2 to units, some of which seem like random other textures, some are just blank ones with all teamcolor. Ive been trying to locate wether the source of this bug is Lua or engine side, but have come up short so I'll post it here. | ||||||||
Steps To Reproduce | Checkout bar:test, hit f11 to make sure you have "Extra Model Shading" enabled in the graphical settings, then '/give all'. Most of the units will have glitched textures, where the normal maps are fine and correct, but tex1 and tex2 are not the ones they should be. You can validate that customunitshaders is on by looking at units with emissive textures, as those should flash on and off. Oddly, toggling and untoggling customunitshaders fixes this bug, but toggling and untoggleing results in units losing self-shadowing. | ||||||||
Additional Information | I apologize if this is a purely customunitshaders bug, and not an engine bug. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Beherith (reporter) 2016-03-04 14:02 |
On screen00149, a different set of random tex1 and tex2 is bound to the large chickens in the center. |
gajop (developer) 2016-03-04 15:26 |
I think I might have had a similar issue with it: http://i.imgur.com/TFpMP2T.jpg using the updated version of the shader framework. To me it seemed as if too many different unit textures were accessed causing the old ones to be dropped from the cache and be invalid when used again. Wasn't able to make a decent bug report out of it though. |
silentwings (reporter) 2016-03-04 19:24 |
For completeness - this bug doesn't appear in 100. |
Kloot (developer) 2016-03-04 19:38 |
Pretty sure it's an engine bug related to texture preloading. On the framework side you'll probably want to fix: api_custom_unit_shaders.lua: normalmapping = (Spring.GetConfigInt("NormalMapping", 1) > 0) versus bgu_mainMenu.lua: Settings['NormalMapping'] = Spring.GetConfigInt('NormalMapping') == 1 (note the different default values passed to GetConfigInt) |
Anonymous (viewer) 2016-03-05 02:19 |
Fix 1edab82e8aa55244fe14a64134752a9d10d421bb committed to develop branch: fix 0005136 a bad case of data-localification without checking for pointer leakage; this means custom object materials are FUBAR in 101.0, repo: spring changeset id: 6726 |
Kloot (developer) 2016-03-07 19:37 |
NB: in the absence of 102.0, a workaround for this bug is to force all model textures to be loaded before the CUS framework by accessing any key of the model subtable: [code] for udid, ud in pairs(UnitDefs) do ud.model.midx end for fdid, fd in pairs(FeatureDefs) do fd.model.midx end [/code] For BAR this won't hurt much because its textures are atlased. (Insert into e.g. http://imolarpg.dyndns.org/trac/balatest/browser/branches/BAR/luaui/widgets/api_unit_texture_preloader.lua) |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2016-03-04 13:59 | Beherith | New Issue | |
2016-03-04 13:59 | Beherith | File Added: screen00148.jpg | |
2016-03-04 14:02 | Beherith | Note Added: 0015968 | |
2016-03-04 14:02 | Beherith | File Added: screen00149.jpg | |
2016-03-04 15:26 | gajop | Note Added: 0015969 | |
2016-03-04 19:24 | silentwings | Note Added: 0015970 | |
2016-03-04 19:38 | Kloot | Note Added: 0015971 | |
2016-03-05 01:14 | Kloot | Assigned To | => Kloot |
2016-03-05 01:14 | Kloot | Status | new => assigned |
2016-03-05 02:19 | Changeset attached | => spring develop 1edab82e | |
2016-03-05 02:19 | Anonymous | Note Added: 0015974 | |
2016-03-05 02:19 | Anonymous | Status | assigned => resolved |
2016-03-05 02:19 | Anonymous | Resolution | open => fixed |
2016-03-07 19:37 | Kloot | Note Added: 0016014 | |
2016-03-07 19:37 | Kloot | Status | resolved => feedback |
2016-03-07 19:37 | Kloot | Resolution | fixed => reopened |
2016-03-07 19:37 | Kloot | Status | feedback => resolved |
2016-03-07 19:37 | Kloot | Fixed in Version | => 101.0+git |
2016-03-07 19:37 | Kloot | Resolution | reopened => fixed |