// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Normal-map contribution check // Not compiled or tested in-world // Setup: Use a classic material face and set FACE. Ensure the original normal texture is readable and restorable. // Stop / restore: Owner-touch again to restore the startup snapshot before removing or resetting. A reset while previewing loses the original snapshot. // Notes: Classic-material controls only; PBR materials may display differently. Use a spare prim and textures whose settings you can read and restore. Another controller must not edit the same face during the preview. The original normal map parameters are kept in memory; no diffuse texture is changed. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer preview; list saved; integer FACE=0; default { state_entry() { saved = llGetLinkPrimitiveParams(LINK_THIS, [PRIM_NORMAL, FACE]); } touch_start(integer count) { if (llDetectedKey(0) != llGetOwner()) return; preview = !preview; if (preview) { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_NORMAL,FACE,NULL_KEY,<1.0,1.0,0.0>,ZERO_VECTOR,0.0]); } else { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_NORMAL,FACE]+saved); llOwnerSay("Original setting restored."); } } }