RacesOfValheim/JotunnModStub/Dvergar
kanym 9dc072f0a5 feat(dvergar): give the eyes a glow, and take the colour from the stars
A player's eyes are painted into the skin texture, and Custom/Player has no
emission channel to light them with - the shader survey in the last commit is
what established that. So a Dvergar wears two small emissive quads over them
instead. There was no working example to copy: the Aswid's red eyes were never
built, only cleaned up, which is why they never glowed.

Colour comes from the same LevelSetup list the skin tint does. One star is
RGBA(0, 4, 3.3), two stars RGBA(12, 0, 8.8) - both far past 1, which is what
makes them bloom rather than merely look bright. Only the base tier's colour is
ours to choose.

The quads hang off Character.m_eye, which already sits at eye height and already
faces the look direction, so the offsets are plain metres in an obvious frame:
no working out which way a rig bone points, and no fighting the 100x scale the
player armature is authored at. Everything about the placement is a named
constant, since none of it can be judged without seeing it.

Applied from the UpdateColors postfix rather than UpdateVisuals so that the
refresh DvergarRace already forces when a boss falls recolours the eyes in the
same frame it recolours the skin. It runs before the race check so it also takes
them off again.

The glow shader is resolved from a list and the winner is logged, because Unity
strips shaders nothing references and assuming one would be a silent failure.
2026-08-05 20:05:52 +02:00
..
DvergarAbilities.cs feat(dvergar): rename from Dvergur, and give it a lightning affinity 2026-08-04 00:22:58 +02:00
DvergarConfig.cs feat(dvergar): give the eyes a glow, and take the colour from the stars 2026-08-05 20:05:52 +02:00
DvergarPatches.cs feat(dvergar): give the eyes a glow, and take the colour from the stars 2026-08-05 20:05:52 +02:00
DvergarProgression.cs feat(dvergar): rename from Dvergur, and give it a lightning affinity 2026-08-04 00:22:58 +02:00
DvergarRace.cs feat(skeleton): show the race on the main-menu character preview 2026-08-05 19:27:34 +02:00
DvergarStatusEffects.cs feat(dvergar): rename from Dvergur, and give it a lightning affinity 2026-08-04 00:22:58 +02:00
DvergarVisuals.cs feat(dvergar): give the eyes a glow, and take the colour from the stars 2026-08-05 20:05:52 +02:00