HammeriteDecal3D

Core: entities. Inherits HammeritePointEntityNode3D < Node3D

A picture stuck on a wall: a scorch mark, a poster, a bloodstain.

What is stored is the PROJECTOR - where it is, which way the surface faced, how big, and which decal - never the triangles. Geometry derived from the world and then saved goes stale the moment the world recompiles. Deriving it here means a wall can move and its decal follows.

The mesh is the receiving wall's own polygon, cut to the decal's footprint, one piece per wall; a quad is the fallback for a decal with no wall under it. Where it sits and what falls under it is HammeriteDecalProjection, which the bake asks the same questions of.

Being the wall cut to shape is also what lights it: each piece is drawn with the decal shader pointed at the lightmap of the wall it came from, so a decal in a dark corner is dark without anything of its own being baked, and it follows the lights on that wall as they are switched. It rebuilds when the world under it is recompiled or rebaked.

Methods

ReturnsMethod
ShaderMaterialdecal_material() static
voidset_map_3d(map_3d: HammeriteMap3D)

Constants

DECAL_RENDER_PRIORITY

const DECAL_RENDER_PRIORITY = 2

Drawn after the walls (opaque -1, transparent 1), because it is drawn ON one of them.

Method descriptions

decal_material()

static func decal_material() -> ShaderMaterial

The brush shader with a decal's two differences: its picture's alpha blends it onto the surface, and it is lit as though it had none. Shared: each decal draws with a copy, and a parameter set on this one reaches every decal made afterwards. Where DECAL_MATERIAL went.

set_map_3d()

func set_map_3d(map_3d: HammeriteMap3D) -> void

Taken from the HammeriteMap3D that builds it, before the properties are applied. Without a map there is nothing to clip against, and the decal falls back to a plain quad.

Hammerite 2.0 · built from 6d57ab2d, 2026-10-17