Files
PNGTuber-Plus/ui_scenes/selectedSprite/opacity.gdshader
Max Litruv Boonzaayer a8f327ae5a Add opacity slider with shader-based rendering that preserves clip mask behavior
- Added opacity slider (0-100%) in sprite options with 'affect children' checkbox
- Implemented hierarchical opacity that affects entire sprite hierarchy when enabled
- Created shader-based opacity system that doesn't interfere with clip mask functionality
- Clip masks now work with original image pixels regardless of opacity settings
- Removed shadow effects from selected sprites to prevent visual conflicts
- Updated save/load system to persist opacity properties with backward compatibility

Fixes clipping behavior issues where opacity changes previously affected clip mask detection
2025-07-20 04:14:58 +10:00

9 lines
151 B
Plaintext

shader_type canvas_item;
uniform float opacity : hint_range(0.0, 1.0) = 1.0;
void fragment() {
COLOR = texture(TEXTURE, UV);
COLOR.a *= opacity;
}