Builtin Library
README.md
material
Materials made from any surface shader, with every property the shader declares set, animated or wired from the graph.
procgen.searchNodes("", { pack = "material" }) lists the family and procgen.describeNode("op.<id>")
describes any one of them.
Ops
material.shader: a material from a surface.shader. Each property itsproperties.yamldeclares is set by name inproperties, as a constant, an animated value or a wired output, and each texture slot by name intextures.blend,cullanddepthWriteset how it draws. A shader that declares abufferproperty reads, throughelements, one vec4 per live element another part of the graph made.
shader is a reference, written asset.resolve("<identity>", "shader"); a
name alone is refused.
local ember = g.op.material.shader({ shader = asset.resolve("@builtin::shaders.unlit", "shader"),
properties = { base_color = { r = 1, g = 0.5, b = 0.1, a = 1 } }, blend = "additive", depthWrite = "false",
cull = "none" })
material.pbr, the metallic-roughness material, comes with the texture pack.
g.material.shader and g.material.pbrMat, nodes of the material nodebox, answer one element
holding the material record (records/material.procRecord), which any input taking a material takes,
io.output shows and io.export saves as a .material.