โ† All examples

godot shaders

Demoscene tunnel from polar coordinates

Fly down an endless tunnel: screen positions become an angle and an inverse distance, which index a procedural checker or stripe wall pattern that scrolls toward the viewer and darkens with depth.

Recorded render of Demoscene tunnel from polar coordinates

What this component contains

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

How it works

Shader type
canvas_item
Parameters
color_a (vec4 = 0.95, 0.4, 0.2, 1), color_b (vec4 = 0.15, 0.1, 0.35, 1), speed (float = 1.2), twist (float = 0.3), segments (int = 12), depth_rings (float = 6), fog (float = 1.4), center_x (float = 0) and 1 more
Use it on
A ColorRect (or any CanvasItem) sized to the area to fill; UVs span 0 to 1 across it.
Result
An orange and purple checkered tunnel rushing toward the viewer into darkness.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/tunnel_polar_2d/

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 pattern pinches at the vanishing point; the fade hides it. Checkers alias near the centre without mipmapped textures.