What this component contains
ATTRIBUTION.mdLICENSEREADME.mdcomponent.jsondemo.tscninspect_shader.pymaterial.trespreview.pngsprite_drop_shadow.gdshadertest_package.pyverification/native.json
How it works
- Shader type
- canvas_item
- Parameters
- shadow_color (vec4 = 0, 0, 0.05, 0.6), offset_x (float = 7), offset_y (float = 7), softness (float = 2.5)
- Use it on
- A Sprite2D (or other textured CanvasItem) with transparent space around its shape, assigned to the node as usual. Effects outside the shape are drawn inside the texture rectangle, so the texture needs a margin.
- Result
- An orange disc floating above the background with a soft dark shadow to its lower right.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/sprite_drop_shadow/
Recorded checks
godot 4.7.2.stable.official.ed1daf0bf
contract_staticengine_runengine_log_cleanshader_in_scenecapture_writtenrender_not_uniformshader_changes_pixels
Limits to consider
Effects outside the shape are drawn inside the texture rectangle, so the texture needs a margin. Offsets larger than the margin are cut at the texture edge. The shadow ignores what lies under the sprite (it is not a light).