SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

R&D Part Icons need shader adjustment / fixed.

shadowmage45 opened this issue ยท 1 comments

commented

Strangely, they seem to use the color masks properly... but things are dull/gray instead of white.

  • Fuel Tanks
  • Mounts
  • Solar Panels
  • CM / SM / LAS
  • StationCore (all)

Things using standard KSP shaders appear to render properly; the mount will have problems, but the engine will render fine.

The masks are in place, and colors assigned properly. How to test if it is the icon shader being used, or the standard masked shader? Why the difference between R&D and editor part icons?

Could be a shader level lighting calculation problem. There is one place where I removed a *2 on a lighting attenuation calculation compared to the legacy shaders (as it looked overbright in the Unity editor), but perhaps it is needed for icons. The specular lighting still appears to be quite strong, but the diffuse is very dim.
The stock icon shader could have special/additional lighting code that I'm unaware of. Not much is known about it other than some property names.

There is one unused property in the stock shader that I currently don't deal with. '_Multiplier'
It is, perhaps coincidentally, set to a static value of '2' in KSP code and never adjusted (all queries for that constant return 2). This could in fact be a 'light multiplier' that is applied to the attenuation.
left = attenuation = 0.5; right = attentuation = 1
image

Would seem to be about what I'm looking at when I look at the icons in the R&D screen.

Will re-add the attenuation as a controllable external multiplier (using _Multiplier shader property), and see where it goes.

commented

Fixed...
screenshot0