feat: Enhance Bevel & Emboss effect with contour support and algorithm improvements

- Implemented contour lookup functionality for Bevel & Emboss effect to allow for custom contour curves.
- Added contour parameter to LayerStyle and updated related structures and functions.
- Improved emboss algorithm by fixing height field calculations and ensuring proper handling of outside pixels.
- Introduced tilt component for 3D emboss effect, enhancing visual depth.
- Optimized MAE grid search parameters for better performance and accuracy.
- Expanded Iced GUI panel for Bevel & Emboss to include contour selection and additional styling options.
- Updated example scripts to reflect changes in the API and new features.
This commit is contained in:
2026-07-14 00:36:09 +03:00
parent 5e03065165
commit 58599bf8f9
11 changed files with 521 additions and 81 deletions
@@ -1126,6 +1126,7 @@ impl HcieIcedApp {
highlight_color: [255, 255, 255, 255],
shadow_blend_mode: "Multiply".to_string(),
shadow_color: [0, 0, 0, 255],
contour: "Linear".to_string(),
},
"Satin" => LayerStyle::Satin {
enabled: true,
@@ -1398,6 +1399,7 @@ impl HcieIcedApp {
(LayerStyle::BevelEmboss { direction, .. }, "direction") => *direction = value,
(LayerStyle::BevelEmboss { highlight_blend_mode, .. }, "highlight_blend") => *highlight_blend_mode = value,
(LayerStyle::BevelEmboss { shadow_blend_mode, .. }, "shadow_blend") => *shadow_blend_mode = value,
(LayerStyle::BevelEmboss { contour, .. }, "contour") => *contour = value,
_ => {}
}
self.documents[self.active_doc].engine.update_layer_style(layer_id, new_style);