Skip to content

Shaders Custom Shaders Details

shadowmage45 edited this page Oct 10, 2017 · 10 revisions

SSTU Custom Shaders

SSTU/PBR

Textures:

  • Diffuse Base - UV0
  • Specular Base - UV0
  • NRM Base - UV0
  • Diff Detail - UV1
  • Spec Detail - UV1
  • NRM Detail - UV1
  • AO - UV1
  • Model Mask - UV1
  • User Mask
    • created at runtime by recoloring system
    • Used to lookup user-defined values
    • Each pixel defines a specific property value; the location of the pixel determines what it defines
    • Each user-configurable channel will consume X number of pixels
    • Pixel arrangement to be done as if the texture was a linear array

Properties:

  • Albedo Color
  • Specular Color
  • Specular Amount
  • Specular Hardness

Standard Materials

  • Brushed Metal
  • Foam
  • Standard Painted

Process:

  • Mesh is assigned a 'material' from the materials library

SSTU/Masked

SSTU/MaskedIcon

SSTU/SolarShader

KSP Shader Properties and Uses in stock code

KSP/ScreenSpaceMask

_MinX - screen-space UV mask 0,0 -> 1,1
_MaxX - screen-space UV mask 0,0 -> 1,1
_MinY - screen-space UV mask 0,0 -> 1,1
_MaxY - screen-space UV mask 0,0 -> 1,1
_Multiplier - unknown, seems to be statically set to '2'

Standard Shaders (diff/spec/bump/emit)

_MainTex - Main Texture. RGB or RGB-SpecA
_BumpMap - Normal map texture.
_RimColor - Part Mouse-over Highlighting (editor/flight). _RimFalloff - Part Mouse-over Highlighting? seems to be statically set to '2'
_Opacity - Part Mouse-over Highlighting. Controls if a part should be transparent while in the editor while unattached to a craft. Also used for stock fairings and 'see through' parts/modules (service bays).
_TemperatureColor - blackbody radiation glow. Unknown if it also handles the 'temperature overlay' feature. _EmissiveColor - Only used in IVA props for glowing button updating (status lights).
_Color - Only used in IVA props and 'GalaxyCubeControl' whatever that is...
_TintColor - Unused
upMatrix
localMatrix
_subdiv
_LayerTransparentFX - Unused