scale2x
scale2x(
tex,uv,texelSize):Node<"vec4">
Defined in: packages/nodes/src/upscale/scale2x.ts:19
Scale2x (AdvMAME2x) pixel art upscaling algorithm. Simple edge-detection based upscaling that preserves pixel art edges.
Parameters
tex
Source texture (pixel art)
uv
Node<"vec2">
UV coordinates
texelSize
Vec2Input = ...
Size of one texel in the source texture
Returns
Node<"vec4">
Upscaled color
Example
// For a 256x256 texture upscaled to 512x512const upscaled = scale2x(texture, uv, [1/256, 1/256])