โ† All examples

godot shaders

Procedural triplanar rock with surface-gradient bump

Rock material for meshes without usable UVs: layered and ridged noise projected along the three world axes and blended by the normal, with crevice darkening and screen-space bump mapping from the same height.

Recorded render of Procedural triplanar rock with surface-gradient bump

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • demo.tscn
  • inspect_shader.py
  • material.tres
  • preview.png
  • test_package.py
  • triplanar_rock.gdshader
  • verification/native.json

How it works

Shader type
spatial
Parameters
rock_light (vec4 = 0.58, 0.55, 0.5, 1), rock_dark (vec4 = 0.3, 0.28, 0.26, 1), crevice_color (vec4 = 0.12, 0.11, 0.1, 1), scale (float = 1.6), blend_sharpness (float = 6), crack_amount (float = 0.5), bump_strength (float = 1.2), roughness (float = 0.9)
Result
Grey-brown stone with darker cracks and bumpy lighting that wraps seamlessly around any shape.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/triplanar_rock/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • contract_static
  • engine_run
  • engine_log_clean
  • shader_in_scene
  • capture_written
  • render_not_uniform
  • shader_changes_pixels

Limits to consider

The pattern is fixed in world space: moving the object slides it through the texture (use object space for movable props). Screen-space bumps can shimmer on distant or tiny surfaces and are flat in shadow. Three projections cost three times the noise.