SHADERERA®Video made in code · v0.1.2PluginsAgentsGitHub ↗
← PluginsRenderingcomponent · v0.1.0 · MIT
render-image-texturesOfficial · by Shaderera

Image textures

Artwork and photos as three.js textures decoded identically in Node and the browser (pure-JS PNG and JPEG), an atlas of many images for instanced cards, and a tool that converts WebP, AVIF, GIF or video frames to PNG once.

Add it to a filmOr ask your agent
“Use the shaderera-plugins skill to add render-image-textures to this film and wire it in, then run check and show me a still.”
Type
component · Rendering
Version
0.1.0 · published
Licence
MIT
Built on
No other plugins
npm
Tags
images, textures, photos, artwork, atlas, cards, webp, png, jpeg, three.js, decode
Source on GitHub ↗
READMErender-image-textures

How to
use it.

Images as three.js textures, the same pixels in Node and the browser; an atlas for many cards; WebP and video frames converted to PNG once.

README.mdexample
node tools/to-png.ts assets/*.webp                 # once: WebP → PNG beside each (colours kept)node tools/to-png.ts --frames 12 assets/clip.webm  # a clip's frames as PNGs
README.mdexample
import * as THREE from 'three/webgpu'import { loadAtlas, loadTexture } from './three/images.ts'const art = await loadTexture(host, 'assets/painting.png')       // { texture, aspect }const card = new THREE.Mesh(new THREE.PlaneGeometry(art.aspect, 1), new THREE.MeshBasicNodeMaterial({ map: art.texture }))const field = await loadAtlas(host, paths, { cell: 512 })        // many images, one texture// field.rects[i].rect = [u, v, w, h] for card i, field.rects[i].aspect its proportions

PNG and JPEG are decoded in JavaScript (fast-png, jpeg-js), never by a canvas or a browser decoder, so every host samples the same pixels. Textures are sRGB and untouched: artwork keeps its colours. Installs three, fast-png and jpeg-js.

More in Rendering02 plugins

More in Rendering