Skip to content

Entry Points

Joshua Miller edited this page Nov 30, 2022 · 2 revisions

Lua scripts may be executed either with raw pixel coordinates, or normalized texel coordinates.

ProcessPixel

Processes each pixel in the image by providing the raw integer pixel coordinates.

function processTexel(x, y)
    return vec(x / imageWidth, y / imageHeight, 1.0)
end

ProcessTexel

Processes each pixel in the image by providing the normalized floating-point texel coordinates. Note that these texel coordinates include a half-pixel offset pre-applied.

function processTexel(x, y)
    return vec(x, y, 1.0)
end

Clone this wiki locally