โ† All examples

godot shaders

Shine sweep across a sprite

Run a bright diagonal shine band across a sprite at intervals, masked by the sprite's alpha, with control of angle, width, softness, speed and the pause between sweeps.

Recorded render of Shine sweep across a sprite

What this component contains

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

How it works

Shader type
canvas_item
Parameters
shine_color (vec4 = 1, 1, 0.95, 1), angle_degrees (float = 30), band_width (float = 0.14), softness (float = 0.5), intensity (float = 0.9), sweep_time (float = 0.8), pause_time (float = 1.4), progress_override (float = -1)
Use it on
A Sprite2D (or other textured CanvasItem) with transparent space around its shape, assigned to the node as usual.
Result
The sprite with a bright diagonal band of light across its middle.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/sprite_shine_sweep/

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 band moves in UV space, so in an atlas it sweeps across the whole atlas region. It brightens additively and can clip on light sprites.