I typed all of this up for EvilleJedi (he asked for it), but decided to just post it all here…
Look at the lines commented-out in Hgn_BC.ship
The short version is, you define up to 32 ‘channels’ of data. A channel can be any value - though in some cases from 0->1 is best. You set the values using calls in the .ship (or using a LUA call) - and you can also assign channel values to named shader inputs - effectively letting you send data to the ship’s materials, and edit it via LUA.
BUT - it gets better.
You can also declare a navlight as using a channel, and it will scale/color based on that channel - so you can do a ‘red alert’ look, indeed a dying look, etc…
In the navlight style you can now use:
colorChannel = XX (channel number) - mults color by value.scaleChannel = XX (changes size of light) - mults scale by channel value.
SobGroup_SetShaderValues(
1 - SobGroup - “MySobGroup”, etc
2 - Scope - just use 17 (trust me)
3 - Effect Base Ships? - 0 for no, 1 for yes.
4 - SubSys filter - “” for no Subs, “*” for all, “XXX” for the named system to target
5 - Base Channel - Channel number to start at… 0->31
6,7,8,etc - Values for each channel from base onwards
)