// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Preview a four-by-four ordered dither // Not compiled or tested in-world // Setup: Use a spare owned prim. Set GREY0..1. Touch for owner-only numeric output. // Stop / restore: Remove/disable; no colors or materials are applied. // Notes: This is a tiny text preview, not a texture generator. Tile pattern is deterministic and spatially structured. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Color calculation only. float GREY=0.4; list BAYER=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5]; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(GREY<0.0||GREY>1.0) { llOwnerSay("Grey must be0..1."); return; } integer row; integer col; for(row=0;row<4;++row) { string line=""; for(col=0;col<4;++col) { float threshold=(llList2Integer(BAYER,row*4+col)+0.5)/16.0; if(GREY>threshold)line+="#"; else line+="."; } llOwnerSay(line); } } }