Documentation / Node reference / tex nodes
tex/QRCode
Creates a QR code as a black and white texture.
Primitives
Encodes 'text' as a QR code and bakes it into a square texture: dark modules black, light modules white. It uses the same encoder and the same layout as geo/QRCode: with the same text, error correction and quiet zone, the texture on a unit plane lines up with that node's geometry.
The smallest code that holds the text is chosen. Text made only of digits, or only of uppercase letters, digits and the characters space $ % * + - . / :, is encoded in the denser modes, so an uppercase URL comes out smaller than the same URL in lowercase.
Each module is a block of 'pixelsPerModule' texels, and the texture has no mipmaps, so the edges stay sharp up close. The side of the texture is (modules per side + 2 * quietZone) * pixelsPerModule texels.
Parameters
| Name | Type | What it does |
|---|---|---|
| text | String | The text to encode, often a URL. Uppercase letters and digits make a smaller code than lowercase. |
| errorCorrection | UInt8 LOW · MEDIUM · QUARTILE · HIGH | How much of the code can be lost and still scan: LOW about 7%, MEDIUM 15%, QUARTILE 25%, HIGH 30%. More costs modules. |
| quietZone | UInt32 | Width of the white margin around the code, in modules. Scanners expect 4. |
| pixelsPerModule | UInt32 | How many texels wide each module is. More keeps the edges sharper when the texture is sampled up close. |
See also
- geo/QRCode
- tex/Image
This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.