โ† All examples

godot shaders

Velvet lighting with grazing sheen

Velvet and plush fabric with a custom light function: a dark, soft diffuse core and a bright sheen that appears where the surface turns away from the viewer and catches the light, plus back-scatter toward the light.

Recorded render of Velvet lighting with grazing sheen

What this component contains

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

How it works

Shader type
spatial
Parameters
core_color (vec4 = 0.35, 0.03, 0.12, 1), sheen_color (vec4 = 1, 0.55, 0.7, 1), sheen_power (float = 2.2), sheen_strength (float = 1.2), back_scatter (float = 0.5), diffuse_softness (float = 0.5), fiber_noise (float = 0.15)
Result
Deep raspberry velvet shapes with pink, glowing edges where the surface turns away.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/velvet_sheen/

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

Empirical lighting, not a microfibre model; not energy conserving. Sheen also appears on surfaces facing away from the light at grazing angles through the back-scatter term. Environment light adds a plain term.