|
group2 0.1.0
CSE 125 Group 2
|
Palette + tunables for the per-player color tint feature. More...
#include <array>#include <glm/vec3.hpp>Go to the source code of this file.
Namespaces | |
| namespace | player_colors |
Variables | |
| constexpr bool | player_colors::k_enabled = true |
| Master toggle. Flip to false to disable per-player tinting entirely. | |
| constexpr float | player_colors::k_blendFactor = 0.6f |
| Mix factor in the shader: 0 = original albedo, 1 = flat tint color. | |
| constexpr std::array< glm::vec3, 10 > | player_colors::k_palette |
| Curated palette of visually distinct hues. | |
| constexpr int | player_colors::k_paletteSize = static_cast<int>(k_palette.size()) |
Palette + tunables for the per-player color tint feature.
On player connect, the server picks the least-used palette slot and attaches a PlayerColor component. The client renderer reads it when filling SkinnedInstance.tint and the skinned PBR shader blends the albedo toward that color so players are easier to tell apart.
The single k_enabled toggle disables the whole feature: server skips assignment, client tint defaults to white-with-blend-zero (no-op).