dolphin.spatial3d · recipe ·
Example · A soft neon seam
Shape a mask and use it for color and emission.
A mask is just a number describing where an effect should appear. Let's make one that is strongest at the equator and fades to zero above and below it. We can use that same mask to choose color and emission. Absolute height is distance from the equator. Multiplying it controls the band's width. Subtracting from one makes the center bright, and clamping removes negative values outside the band.
start.yh · Dolphin material exampleStatus: complete-program
Example · A soft neon seam
Shape a mask and use it for color and emission.
cpu · type checked
using dolphin.materials
using dolphin.math
using dolphin.spatial3d
Surface(Vector3 position) -> dolphinSurface
{
float seam = DolphinClampFloat(1.0 - Math.AbsFloat(position.y) * 8.0, 0.0, 1.0)
Vector3 dark = Vector3(0.015, 0.02, 0.04)
Vector3 neon = Vector3(1.0, 0.05, 0.6)
Vector3 color = DolphinSurfaceMix(dark, neon, seam)
return DolphinSurface(color, 0.3, 0.2, seam * 3.0)
}
dolphinSurface center = Surface(Vector3(0.0, 0.0, 0.0))
Console.Log(Text.Format("{0}, {1}, {2}", center.color.x, center.color.y, center.color.z))project.mech
manifestVersion = "2"
package = "api.example.recipe__shader_glow"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"
[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"
[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"
Expected output
1, 0.05, 0.6
Notes and source
Change 8.0 to 4.0 to widen the seam. Then compare emission multipliers 0.0 and 3.0 with the same mask.
demonhunterlabs/app/lib/yeho-walkthrough.ts