โ† All examples

godot shaders

Procedural marble with turbulent veins

Polished marble in object space: veins from a sine of position bent by fractal turbulence, a second finer vein network, cloudy body variation and glossy finish, for floors, statues and counters without textures.

Recorded render of Procedural marble with turbulent veins

What this component contains

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

How it works

Shader type
spatial
Parameters
body_color (vec4 = 0.92, 0.91, 0.88, 1), cloud_color (vec4 = 0.82, 0.8, 0.78, 1), vein_color (vec4 = 0.25, 0.27, 0.3, 1), scale (float = 1.6), vein_frequency (float = 3.5), turbulence (float = 4.5), vein_sharpness (float = 14), fine_veins (float = 0.4) and 1 more
Result
White polished stone with dark grey wandering veins and soft cloudy areas.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/marble_veins/

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

Solid texture in object space: objects that should continue one slab need the same transform. Veins have no depth or translucency. Ten noise octaves per pixel plus fBm make it moderately expensive.