[What]
glow.fx is the stock BigWorld self-illuminated shader compatible with any colour. 
It is performance friendly and casts no shadow.

-----------------------------------------------------------------------------------------------------------------
[Why]
This is the only way to make a reddish glow, aside from using an actual volumetric light source.
Red glow is essential for UML's signal lights feature (brake light, turning lights)
Signal lights feature is achieved by using triggered animation. Bury a glowing mesh beneath tank surface when idle, pop up to be visible when brake/turning trigger is activated. Check the following file:
    * instruction_on_new_animationBone.txt
    * instruction_on_triggered_animations.txt

The other (easiest) way to make a texture glow is to use GMM map, however red spectrum is excluded. GMM glow works only when the assigned diffusion map is far enough away from red (RGB:255,0,0)

Glow.fx shader was broken when WoT2.0 came out, but later fixed during 2020 Halloween event. Its skinned variant glow_skinned.fx remains broken. There is howver a way to work around it.



-----------------------------------------------------------------------------------------------------------------
[How - skinned model]

1. Build a normal gun project in 3dsmax, skin all other mesh objects as usual.
2. Do NOT skin the mesh object intended for the glow shader. Link this object under its intended animation bone instead.
3. When manually editing the material in visual file, use glow.fx when writing the primitiveGroup, as if you are composing material for static model (like a turret), because this particular renderSet really is a static object.
4. Example of such static glow primitiveGroup can be found in the next section.
5. Remember, the identifier of this primitiveGroup must contain keyword 'tank_equipment', otherwise it will crash without leaving a trace in python.log, when the receiving tank has camouflage applied.

Chassis and gun are skinned model, thus require using skinned shader. UML's animation bones are nested in gun model so normally we need glow_skinned.fx, which is unfortunately broken.

But it is discovered that one can have both skinned and unskinned (static) model in gun visual as long as they are each assigned the correct skinned or unskinned shader.

UML animates things by manipulating node transform matrix, thus skinned is not a prerequisite. A static mesh linked under the said node will still move with it as a whole. Of course only rigid transition animation is possible, which is exactly how the signal light works. Any scenario that requires having multiple bones influencing the same mesh would still needs to be skinned (thus requiring a working skinned shader).




-----------------------------------------------------------------------------------------------------------------
[How - static model]

Just use glow.fx and its fellow parameters in primitiveGroup.
A working example as below, note that the available paramters shown here are not exhaustive.
Remember, the identifier of this primitiveGroup must contain keyword 'tank_equipment', otherwise it will crash without leaving a trace in python.log, when the receiving tank has camouflage applied.



			<primitiveGroup>	0
				<material>
					<identifier>	tank_equipment_glass	</identifier>
					<fx>	shaders/std_effects/glow.fx	</fx>
					<collisionFlags>	0	</collisionFlags>
					<materialKind>	0	</materialKind>
					<property>	selfIllumination
						<Float>	100	</Float>
					</property>
					<property>	doubleSided
						<Bool>	true	</Bool>
					</property>
					<property>	normalMap
						<Texture>	vehicles/WAPA/W13_BMP1/anm.dds	</Texture>
					</property>
					<property>	diffuseMap
						<Texture>	vehicles/WAPA/W13_BMP1/taillights.dds	</Texture>
					</property>
					<property>	destBlend
						<Int>	9	</Int>
					</property>
					<property>	srcBlend
						<Int>	9	</Int>
					</property>
				</material>
			</primitiveGroup>

-----------------------------------------------------------------------------------------------------------------

Value meaning in <srcBlend> and <destBlend>:

('ZERO', 1);
('ONE', 2);
('SRCCOLOR', 3);
('INVSRCCOLOR', 4);
('SRCALPHA', 5);
('INVSRCALPHA', 6);
('DESTALPHA', 7);
('INVDESTALPHA', 8);
('DESTCOLOR', 9);
('INVDESTCOLOR', 10);
('SRCALPHASAT', 11)
