DriftTexture · type
ChannelSemantic
What a channel is, declared rather than conventional.
Explained in DriftTexture.
type ChannelSemantic = 'albedo-srgb' | 'albedo-linear' | 'normal-tangent-yup' | 'normal-tangent-ydown' | 'roughness-linear' | 'gloss-linear' | 'metallic-linear' | 'occlusion-linear' | 'height-linear' | 'emissive-srgb' | 'mask-linear'import type { ChannelSemantic } from '@driftengine/texture';In depth
The family of defects this removes is the one nobody attributes correctly. A normal map upside down in one asset and not in another; an albedo that is linear here and sRGB there; a gloss map read as roughness, which inverts every highlight in the scene. Each is a convention held in somebody's head, and each survives review because the file looks fine on its own.
Declared, the format knows. A consumer never sees a convention at all, because normaliseSample
has already applied it — a Y-down normal comes back Y-up, an sRGB value comes back linear, and
gloss comes back as the roughness the engine shades with.