light op• データ種: rgb → normalmap
• 呼び出し: import gfx2d; gfx2d.normal_map_decode(rgb) (または opsgfx2d.get("normal_map_decode"))
`[0, 1] の接空間法線マップ rgb を単位ベクトル (H, W, 3)` へ。
> 以下の詳細説明は原文のままです —— 要約と見出しは訳出済み。
The usual encoding `n = 2c - 1` followed by normalisation. The result is
the `normalmap` sort the rest of the library already speaks, so a decoded
map can go straight into the 3-D normals family.
Raises ValueError: a pixel whose decoded vector has zero length (the encoded
colour was exactly mid-grey), because normalising it would silently invent a
direction.
• サンプルデータ カタログ(DL URL / ライセンス) — 2-D は skimage.data(BSD/public)+ 合成、3-D は実データ源(Stanford/PDS 等)の DL URL。
• 演算子の来歴・参考文献 — この op 族の元になった研究/手法の出典。
• アルゴリズムの正典(著者・年)と用途は上記ファミリ使い方ガイドに記載。
• gfx2d_scene — py -3.11 examples/gfx2d_scene.py
normalmap を入力に取れる)light)radial_light · light_mask · normal_map_shade · shadow_cast_2d
*Provenance: gfx2d.py — GFX2D operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.