Skip to main content
Version: 0.10.0

UeSpriteMaterial

A simplified material designed for 2D-like rendering of flat meshes or billboards. It is optimized for performance by skipping lighting calculations and handling transparency out of the box.

Inherits from UeMaterial.


Constructor​

new UeSpriteMaterial(data = {})

Data Parameters​

NameTypeDefaultDescription
data.mapTextureundefinedThe albedo texture for the sprite
data.colorcolorc_whiteTint color for the sprite
data.transparentbooltrueWhether the material supports transparency
data.sideconstcull_nocullingSide culling mode

Properties​

PropertyTypeDefaultDescription
shadershadersh_ue_spriteThe shader used for rendering
lightsint0Number of lights (always 0 for this material)
transparentbooltrueTransparency flag
colorarray[1, 1, 1]Normalized RGB tint color

🎨 Usage​

UeSpriteMaterial is specifically used with UeSprite. It automatically manages the sh_ue_sprite shader which supports specialized features like camera-facing orientation and axis locking.

var material = new UeSpriteMaterial({
map: new UeTexture(spr_particle),
color: c_orange,
transparent: true
});