Thursday, March 12, 2026
Friday, February 20, 2026
PTF Notes
Procedural Texture Filter Notes
dim(x,y) Dims x by y, x is the dimming get, y is the dimming amount. It is a vector function
dim(x,y)=clampmin(x-y,0)
dim(perlincubic(x*a/w,y*a/h,10,.5),cellnoise(x*a/w,y*a/h,1))+3*i
perlincubic(x*a/w,y*a/h,10,.5)-cellnoise(x*a/w,y*a/h,1)+3*i
var v=vec2(rx,ry)*a/w; var v1=round(v); step(e,length(dim(v,v1)))
copysign(t1, t2) Copies the sign bit from t2 to t1.
tocui converts a function that is in the range (-1,1) to (0,1) but if it extends beyond that range it still just scales it. For example perlinhcubic includes some values beyond 1 and below -1 and these come in scaled to range 0,1. F(t)=t/2+1/2
There is a mistake in the documentation for mapcui as mapcui(t,e0,e1). The edges actually come first as in mapcui(e0,e1,t)



