aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects/data
Commit message (Collapse)AuthorAgeFilesLines
* RectangularShadow: Add support for individual corner radiusKaj Grönholm2025-10-231-0/+31
| | | | | | | | | | | | Add API for specifying individual corner radius values similar to Quick Rectangle. Try to keep the overhead minimum when not used, by storing data in lazily allocated extra and using separate shader. Use the API in the neumorphicpanel example. Task-number: QTBUG-141110 Change-Id: I90e558526dff01c88fb2d163a33704b8f73aa1fc Reviewed-by: Richard Moe Gustavsen <[email protected]>
* Add RectangularShadow elementKaj Grönholm2024-11-092-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | Add a new element into QtQuick.Effects called RectangularShadow. This is a high performance shadow/glow for (rounded)rectangle shapes. Differences compared to QGE RectangularGlow: - Implemented in C++ and part of QtQuick.Effects module. - Different API, modelled based on CSS box-shadow. - Shader uses SDFs math for rounded rectangle. Reduced item size and properly rounding math (circle is a circle). - Allows offset and spread relative to item. - Default color is black (shadow) rather than white (glow). - Using "layer.enabled" for cache property rather than separate ShaderEffectSource. - Property "material" so shader effect can be customized. QQEM can contain RectangularShadow node for easier customization. Contains an example and lancelot tests. Task-number: QTBUG-128469 Change-Id: Ie3baa774a3294ba0c7fe11d1bee8cd7aae897505 Reviewed-by: Kaj Grönholm <[email protected]>
* Fix MultiEffect shadow opacityKaj Grönholm2024-10-281-1/+0
| | | | | | | | | | | | | MultiEffect shadow coloring was fixed in QTBUG-123396. Unfortunately that caused shadow opacity to be taken into account twice. First in multiplication and second in mix which takes shadowColor including the alpha. Instead, remove multiplication and make the shadowColor to have premultiplied alpha. Task-number: QTBUG-130582 Pick-to: 6.8 Change-Id: I14c95ef13009dada5f1125d98c019e9c5d7f8245 Reviewed-by: Tomi Korpipää <[email protected]>
* Fix MultiEffect shadow coloringKaj Grönholm2024-09-091-3/+3
| | | | | | | | | | The algorithm for shadow didn't work correctly when the source item was dark and the shadow color wasn't black. Fix the shadow calculation. Task-number: QTBUG-123396 Pick-to: 6.8 Change-Id: Ib038bef4ebdd374cfb3c992c16173f8d8ddc5d13 Reviewed-by: Tomi Korpipää <[email protected]>
* Add license headers to shader sourceEskil Abrahamsen Blomfeldt2023-10-302-0/+6
| | | | | | Pick-to: 5.15 6.2 6.5 6.6 Change-Id: I007eaddf0a3a9e7e6242d4e02b487fa0806c96a7 Reviewed-by: Laszlo Agocs <[email protected]>
* Use build time shader processing for multieffectLaszlo Agocs2023-08-0127-46/+0
| | | | | | | Pick-to: 6.6 Change-Id: I63864b622fe14b102e3a0267433e69f20689f320 Reviewed-by: Kaj Grönholm <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Adjust the MultiEffect APIKaj Grönholm2023-01-2628-4/+4
| | | | | | | | | | | | Based on the API review, adjust the MultiEffect API. - Change mask threshold Low/Up to Min/Max and for spread AtMin/AtMax. - Change colorize to colorization so it is more symmetric with brightness, saturation etc. Task-number: QTBUG-109557 Pick-to: 6.5 Change-Id: I96ff2a13e20405998c5ed0cb38ad3b5911daf94c Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* Improve and optimize MultiEffect maskKaj Grönholm2022-12-2027-2/+2
| | | | | | | | | | | Move mask calculations from fragment shader into C++ side, so that only need to be done once vs. each pixel. Adjust slightly so that smoothstep doesn't reach potentially undefined rangle (edge0 ≥ edge1). Task-number: QTBUG-109431 Pick-to: 6.5 Change-Id: If0ca10385c9bf41fb32b666f2b1c4dd38b7cc192 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
* Add QtQuick.Effects & MultiEffectKaj Grönholm2022-12-0732-0/+254
Add new QtQuick.Effects plugin for post-processing effects. The plan is to add essential effects directly into QtQuick, not to duplicate Qt Graphical Effects. Initially the plugin will contain MultiEffect which supports 7 different effects in a single ShaderEffect (brightness, contrast, saturation, colorize, blur, shadow, mask). Combining multiple effects into a single shader is more performant than chaining multiple effect items. Depending on used features, the most optimal shader gets selected. Includes two examples demonstrating the usage of MultiEffect. Task-number: QTBUG-106651 Change-Id: I35865030fd4b7a1f657146cee03b195451545bc6 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>