diff options
author | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2020-02-27 15:01:46 +0200 |
---|---|---|
committer | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2020-02-28 14:02:30 +0200 |
commit | 27247ff41708c3de59aa532691adb1fd8de48902 (patch) | |
tree | f0423e2dcdd63478b4e08a352e58b6029dcf7b02 /doc | |
parent | 85c160af8154e4faf9fc111e404da1101723013e (diff) |
Document dynamic layer resizing
Task-number: QT3DS-4077
Change-Id: Ia045725d76811554a2f1dc7f630abbaed5fcfe74
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/03-studio/7-inspector-palette.qdoc | 17 | ||||
-rw-r--r-- | doc/src/layers.qdoc | 11 |
2 files changed, 28 insertions, 0 deletions
diff --git a/doc/src/03-studio/7-inspector-palette.qdoc b/doc/src/03-studio/7-inspector-palette.qdoc index 7ba48b9b..5310d1c5 100644 --- a/doc/src/03-studio/7-inspector-palette.qdoc +++ b/doc/src/03-studio/7-inspector-palette.qdoc @@ -236,6 +236,23 @@ in the Inspector palette: presentation and the layer, either in pixels or as a percentage of the presentation's height. \li + \b{Dynamic Resize} - The layer is resized dynamically based on the content. + This allows the layer texture to be the smallest possible in order to increase performance. + The texture is continuously resized as the content changes. +\li + \b{Padding} - The resized layer can be padded. This lowers the amount of resizes + needed as the content changes. The layer is resized only when the content changes + so much that it exceeds the previous padded size. Padding is also used in reverse + to calculate the lower bounds. When the content changes to be smaller, the resize + only happens after it takes less space than the lower bounds. The padding can be + expressed in pixels or as percentage of the layer size. +\li + \b{Combine Bounds} - When \c{Dynamic Resize} is in use, the bounds of the objects + inside the layer have to be calculated. When this property is disabled, all object + bounds are calculated separately and a more accurate layer resize is done based on + those separated bounds. When this property is enabled, the object bound calculations + are combined, causing more inaccurate but faster results. +\li \b{Ambient Occlusion} - Enables ambient occlusion (AO). AO is a form of approximated global illumination which causes non-directional self-shadowing where objects are close diff --git a/doc/src/layers.qdoc b/doc/src/layers.qdoc index 6bec78dc..016ee81f 100644 --- a/doc/src/layers.qdoc +++ b/doc/src/layers.qdoc @@ -116,4 +116,15 @@ the order objects are rendered. \l{Using Variant Tags}{Variant tags} makes it possible to exclude layers during loading to optimize performance. +\section2 Dynamic Resize +The Dynamic Resize property causes the layer to be dynamically resized based on the content. +This makes the layer texture as small as it can be while still showing all the content. +Thus effects like SSAA can be done more efficiently on the layer, since the empty space around +the content doesn't take up computing power. This can also, depending on the hardware, cause +performance problems due to constant resizing. This can be mitigated with the Padding property. +While resizing may cause problems on the GPU side, the content bounds calculation also takes time +on the CPU. If more inaccurate bounds are enough, Combine Bounds can be used to have less +calculations per object in the layer. The user has to balance the performance cost of the resize +to the performance gain of the lower texture size when evaluating the use of this feature. + */ |