mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-28 20:17:18 -06:00
HsvTable::apply took the value through linear -> sRGB -> linear even when the table's value scale is 1 (every hue/saturation-only table, as fitted camera looks are), and wrapped hues with rem_euclid (an fmodf call) three times per pixel. The value is now kept as it is for a unit scale and the sRGB-encoded value is reused otherwise; hues are wrapped by a helper that equals rem_euclid bit for bit (tested) without the call for values within one period. 2048 px render of a 24 MP ARW, single thread: 16.4 -> 15.1 G instructions, 4.94 -> 4.76 G cycles. Sources: own design. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>