Documentation / Node reference / mat nodes

mat/MeshBasicTexture

Draws a texture on a mesh, with no lighting.

Mesh

Points at a TEX node and samples it through the geometry's uv attribute. Nothing here reacts to light, so the image lands on the surface as authored, which is what artwork, labels, sprites and pre-baked shading want. The texture's own alpha is what carries transparency, and the CPU cannot inspect texels to guess: say so with transparencyMode, BLEND for soft edges and MASK with alphaCutoff for hard cutouts. Geometry with no uv attribute samples the same texel everywhere and comes out flat.

Parameters

Name Type What it does
color Color4 The opacity dial for the whole material. Only the alpha channel is used: it multiplies the texture's own alpha, so lowering it fades the surface out evenly wherever the texture is already visible. Under AUTO an alpha below 1 is also what moves the material to the transparent pass. The red, green and blue channels do nothing, since the texture alone decides the colour.
path NodePath The TEX node holding the texture to draw. It is required: with nothing to sample, the node errors rather than drawing.
transparencyMode UInt8 AUTO · OPAQUE · MASK · BLEND Whether this material is drawn in the opaque pass or through order-independent transparency. AUTO decides from the material itself, which for most materials means its colour alpha below 1. OPAQUE always draws in the opaque pass and ignores alpha entirely, which is what you want for a material whose alpha is incidental. MASK draws in the opaque pass but throws away fragments below alphaCutoff, which is what hard-edged cutouts want: they still write depth, so they occlude each other correctly. BLEND always goes through transparency, which is the only way to get soft texture alpha to show, since nothing on the CPU side can inspect the texels.
alphaCutoff Float In MASK mode, the alpha below which a fragment is thrown away entirely. It applies to the shadow the object casts as well as to the object, so a cutout leaf casts a leaf-shaped shadow rather than a rectangle. Only used when transparencyMode is MASK.
sides UInt8 FRONT · BACK · BOTH Which side of each triangle is drawn. FRONT draws the outward-facing side only, which is what a closed mesh wants: its inner surface is hidden anyway, so drawing it is wasted work. BACK draws the inward-facing side, for a surface seen from the inside such as a skydome or a box the camera sits in. BOTH draws either side, which is what an open single surface needs: a cutout leaf, a sheet of cloth, or a plane the camera can walk around, all of which disappear from one side under FRONT. The shadow pass follows BOTH so an open surface still casts a shadow whichever way it faces the light, and draws FRONT otherwise.

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.