light_mask — GFX2D light op

• Data kinds: rgb × rgb → rgb

• Call: import fullseye as fs; fs.ledger.light_mask(base, light, ambient=0.0) (implementation को सीधे call करना हो तो import gfx2d; gfx2d.light_mask(base, light, ambient=0.0), registry से लेना हो तो opsgfx2d.get("light_mask"))

उपयोग

rgb image को rgb light map से modulate करता है: base * (ambient + light)।

> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।

ambient is the light that reaches everything; ambient=1 with a black light map returns the base exactly, which is the identity the test suite pins.

The product is clipped to [0, 1]; the clipped amount is not returned. Both arguments should be in the same encoding — mixing an sRGB base with a linear light map is the second silent-error trap of this family, and the only defence is that both arguments are named.

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• gfx2d_scene — py -3.11 examples/gfx2d_scene.py

वे अगले ops जिनसे type जुड़ता है (rgb को input के रूप में लेते हैं)

srgb_to_linear · linear_to_srgb · blend_mode · normal_map_decode · bloom · vignette · chromatic_aberration · film_grain

इसी category के (light)

radial_light · normal_map_decode · normal_map_shade · shadow_cast_2d


*Provenance: gfx2d.py — GFX2D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.