โ† All examples

godot shaders

Woven fabric with thread relief and sheen

Woven cloth from UVs: warp and weft threads crossing over and under in a plain or twill pattern, each thread shaded as a rounded strand through the normal map, with Godot's rim term for the soft cloth sheen.

Recorded render of Woven fabric with thread relief and sheen

What this component contains

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

How it works

Shader type
spatial
Render modes
cull_disabled
Parameters
warp_color (vec4 = 0.22, 0.32, 0.55, 1), weft_color (vec4 = 0.75, 0.72, 0.65, 1), threads (float = 60), twill (bool = yes), thread_gap (float = 0.12), relief (float = 0.6), fuzz (float = 0.25), sheen (float = 0.6)
Use it on
A mesh with UVs and tangents; thread size follows the UV scale.
Result
A blue and cream twill cloth with visible rounded threads and diagonal ribs.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/fabric_weave_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

Threads alias into moire when they get smaller than a few pixels; lower `threads` for distant cloth. Relief is a normal map only. The rim sheen depends on renderer support for the RIM output.