mirror of
https://github.com/litruv/PNGTuber-Plus.git
synced 2026-07-24 02:26:02 +10:00
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
This commit is contained in:
8
ui_scenes/selectedSprite/opacity.gdshader
Normal file
8
ui_scenes/selectedSprite/opacity.gdshader
Normal file
@@ -0,0 +1,8 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float opacity : hint_range(0.0, 1.0) = 1.0;
|
||||
|
||||
void fragment() {
|
||||
COLOR = texture(TEXTURE, UV);
|
||||
COLOR.a *= opacity;
|
||||
}
|
||||
Reference in New Issue
Block a user