โ† All examples

godot shaders

Soft particle card with depth fade

Transparent card material for smoke, dust and glow sprites that removes the hard line where the card cuts into geometry: alpha fades by the distance to the scene depth behind it, and near the camera.

Recorded render of Soft particle card with depth fade

What this component contains

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

How it works

Shader type
spatial
Render modes
unshaded, cull_disabled, depth_draw_never, shadows_disabled
Parameters
depth_texture (sampler2D), sprite (sampler2D), tint (vec4 = 0.8, 0.82, 0.88, 0.8), fade_distance (float = 0.6), camera_fade_near (float = 0.3), camera_fade_far (float = 0.8), fade_power (float = 1)
Use it on
Optional: a sprite texture with alpha for `sprite` (the bundled material uses a procedural one).
Result
Soft grey puffs that blend smoothly into the floor and the crate where they intersect.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/soft_particle_depth_fade/

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

Only opaque geometry is in the depth buffer; cards do not soften against each other. The gap is measured along the view axis. Unshaded: combine with `smoke_billboard` ideas for lit puffs. Cards are sorted per object.