โ† All examples

godot shaders

Geometry debug views: normals, tangents, UV, depth

One unshaded debug material with a mode switch: world normals, view normals, tangents, binormals, UVs, vertex colours, linear depth bands or world position cells, for checking imported meshes and shader inputs.

Recorded render of Geometry debug views: normals, tangents, UV, depth

What this component contains

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

How it works

Shader type
spatial
Render modes
unshaded
Parameters
mode (int = 0), depth_band (float = 0.5), position_cell (float = 0.25), flip_back_faces (bool = yes)
Result
Meshes coloured by their world-space normals (red, green and blue per axis) in the default mode.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/normal_debug_view/

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

Debug output only: unshaded and not meant for final art. Tangent and binormal modes need meshes with tangents. Normals are the interpolated vertex normals after any normal map is ignored.