fullseye

normal_map_decode — GFX2D light op

使い方

Tangent-space normal map rgb in [0, 1] to unit vectors (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.

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(normalmap を入力に取れる)

normal_map_shade

同カテゴリ(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.