โ† All examples

godot shaders

UV checker with direction ramps and stretch map

Debug a mesh's UV layout: a numbered-style checker with red and green ramps showing the U and V directions, cell lines, and an optional heat map of texel stretching from screen-space UV derivatives.

Recorded render of UV checker with direction ramps and stretch map

What this component contains

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

How it works

Shader type
spatial
Render modes
unshaded
Parameters
cells (float = 8), dark_color (vec4 = 0.18, 0.18, 0.2, 1), light_color (vec4 = 0.82, 0.82, 0.85, 1), direction_tint (float = 0.45), line_pixels (float = 1), show_stretch (bool = no), stretch_range (float = 3)
Result
Objects covered in a tinted checker with corner markers that reveal the UV direction on every face.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/uv_checker_grid/

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 stretch map compares screen-space derivatives, so it depends on the viewing angle; judge stretch facing the surface. UVs outside 0 to 1 repeat the ramps. Unshaded, so it shows no lighting.