mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
fix(models): tracked and emergency tints mix into aircraft paint instead of multiplying it
Aircraft models multiplied their tint into the shaded paint (HIGHLIGHT). A saturated tint zeroes every channel it lacks: the tracked cyan (no red) drew a red helicopter solid black, day or night, and a white Cessna one flat cyan. Tinted models now mix the colour in at 30% (AIRCRAFT_MODEL_TINT_MIX), so the paint stays readable and the colour still marks them; untinted models still draw their own colours, and the IR boost stays flat white. Neither the multi-part models nor the part shader were involved: old and new GLBs, with and without the shader, render the same pixels, and an untinted model at night is lit by the default ambient term. The new conformance check draw.models.paint draws a model painted with COLOR_0 under a fixed sun and reads its colour by day, at night, and under a tint mixed in. The parts test model can now carry vertex paint.
This commit is contained in:
1 parent
953af60e1d
commit
e83c1672dd
9 files changed
+221
-12
No files matched your search
@@ -405,7 +405,7 @@ export function createAircraftModels({
|
||||
tint: record.tint ?? WHITE,
|
||||
// The mesh's own colours, tinted while tracked or in an emergency;
|
||||
// the IR boost draws it flat white.
|
||||
colorBlend: aircraftModelBlend(state._irBoost === true),
|
||||
colorBlend: aircraftModelBlend(state._irBoost === true, record.tint),
|
||||
environmentMap: AIRCRAFT_ENVIRONMENT_MAP_OPTIONS.enabled,
|
||||
...(record.parts ? { parts: record.parts } : {}),
|
||||
show: record.show,
|
||||
|
||||
Reference in new issue
Block a user