โ† All examples

godot shaders

World-space prototyping grid

Anti-aliased world-space grid for level blockouts: minor and major lines of constant pixel width, X and Z axis lines in colour, projection picked from the dominant normal axis so floors and walls both get squares, and distance fade.

Recorded render of World-space prototyping grid

What this component contains

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

How it works

Shader type
spatial
Parameters
base_color (vec4 = 0.32, 0.34, 0.38, 1), minor_color (vec4 = 0.48, 0.5, 0.55, 1), major_color (vec4 = 0.82, 0.84, 0.88, 1), cell_size (float = 0.5), major_every (int = 4), line_pixels (float = 1.2), show_axes (bool = yes), fade_distance (float = 40) and 1 more
Result
Grey surfaces with crisp light grid lines, heavier every few cells, and red and blue axis lines on the floor.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/world_grid_debug/

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

Sloped surfaces snap to the nearest axis plane, so lines stretch on 45 degree slopes. The grid is fixed in world space and slides across moving objects. Lines thinner than one pixel fade instead of vanishing.