Emissive tint and bulb glass (SIX-208) #274
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!274
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/274/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-25 13:53 UTC · original
holdmysocks:six-emissive-tint-glass→master· +121 −13 · 8 files · 8 commits · merged 2026-11-25 14:57 UTCStacked on #271 (which is stacked on #268). It fixes the two problems listed in #271.
Neon tubes lit white
The emissive shaders have a
float3constant right afteremissivemultiplierin their buffer,7ab0fd74. Its name is not recovered. It is the colour of the light:In 523 emissive materials it is white on 324 and one of 32 colours on the rest. It is never black. Only emissive shaders (and
standard_interior) have it.emissiveFactor. It is written asemissive_strength.tint(null without one) in model.json, materials.json and the GLB extras, and the materials note explains it. A tint that is black, negative or not finite is ignored.Bulb filament hidden
The candle bulb's glass shell (
standard_alpha_inst) has a colour texture with constant alpha 64. The rule that draws constant-alpha materials opaque was made for ped clothing, and it made the glass opaque too. The rule now skips the forward-alpha shader families from the family table (standard_alpha,standard_alpha_inst,standard_alpha_secmo,standard_anisotropy_dirt_alpha). Their alpha is their opacity. Shaders that are alpha only by their render-bucket flags (ped clothing) are still drawn opaque.In the 493 sample models, 23 glass materials went back to BLEND. Two
standard_dirt_alphamaterials keep the rule.Checked
extensionsUsedis right.cargo check --workspace --all-targetsandcargo test -p sixng-core -p sixng-gui --releasepass. New tests cover the tint (export, factor, invalid values, viewer colour) and the glass families versus bucket-only alpha.The Metal 4 renderer is still not changed.
strength = multiplier / 100 (1.0 = 100 nits), at most 100. Up to 1 it is the emissiveFactor; above 1 the factor is 1 and KHR_materials_emissive_strength holds the strength (listed in extensionsUsed). A multiplier of 0 (switched on at run time) stays lit at strength 1. model.json, materials.json and the GLB extras get emissive_strength {multiplier, strength, source}. The viewer scales emissive materials by the square root of the strength, kept in 0.25..3.