summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix data inputs with delayed loadingv2.7.0-rc2Jere Tuliniemi2020-05-083-0/+18
| | | | | | | | | Initialize data inputs and outputs every time a presentation is loaded. Task-number: QT3DS-4105 Change-Id: If2e9a6d95cc40109cb48f4d4d8b5dc88f963fb74 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix editor loading custom material imagesAntti Määttä2020-05-071-6/+19
| | | | | | | | | Add project path to the custom material image path and check if the image path contains ../. Change-Id: Iab436ffa304c94cdc8235dc9fbf06abd9c060e71 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add ECT2_EAC to supported ktx formatsAntti Määttä2020-05-071-0/+2
| | | | | | Task-number: QT3DS-4102 Change-Id: I2dc4ab64715ffa3c2a13309b716ca4ffcdd51b3e Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix studio viewport rendering when scene camera is visibleAntti Määttä2020-05-0712-46/+15
| | | | | | | | | | The runtime contains unused viewport parameters. Remove those and fix the editor by reading the scissor rect from render list instead of render context, which contains wrong scissor rect. Task-number: QT3DS-4103 Change-Id: I8b443c3a5e8d7ac84eb211633cea2afeed6da30b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix activating child elements when di activatingAntti Määttä2020-05-041-7/+12
| | | | | | | | | | Time-activation is not done for child elements in all cases. Add check for it in the activation handler. Task-number: QT3DS-4100 Change-Id: Ib34777afc35db7a0ce6748da01e6feec1de37f5e Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Add missing signal documentationTomi Korpipää2020-04-281-0/+16
| | | | | Change-Id: Ie3dec5105059cbbfe1bf104dac4458020e75538b Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Don't try to load images with a subpresentation id as the pathJere Tuliniemi2020-04-271-1/+2
| | | | | | | | | | Custom materials using subpresentations would have their textures loaded as images and failing because of the invalid path. Task-number: QT3DS-4094 Change-Id: Iadcf5237dc26c5666c8b54cdee0fed3a01434d77 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Document QQuickImageProvider usageJere Tuliniemi2020-04-271-0/+24
| | | | | | | Task-number: QT3DS-4049 Change-Id: I655de11b904a8828d7c428f91c0874e74106fdf5 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add default texture paths to source pathsAntti Määttä2020-04-242-5/+12
| | | | | | | | | | The custom material/effect default textures are added to the graph object attribute list so that they can be loaded when delayed loading is enabled. Task-number: QT3DS-4037 Change-Id: I88219b49a6d696de7ca45b900aa3628d48de701e Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Limit directional shadow map frustum to scene boundsJere Tuliniemi2020-04-241-31/+70
| | | | | | | | | | If using scene bounds creates a smaller shadow map camera frustum, use that. Task-number: QT3DS-3273 Change-Id: I87d8baac11610c03d70ec9207381aa8b96c62195 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add support for skipping rendering framesKaj Grönholm2020-04-1613-2/+121
| | | | | | | | | | Add skipFramesInterval property into Q3DSViewerSettings. This property can be used to limit the rendering framerate, decreasing the CPU/GPU usage. Task-number: QT3DS-4088 Change-Id: Icbf5cf208b663dbef1df6096994b94686571e357 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Merge branch 'master' into 2.7Antti Kokko2020-04-1614-11/+173
|\ | | | | | | Change-Id: Ie113ad83148ae735a691614e5f771a3c5cc0bc9c
| * Add support for progressive stereoscopic renderingKaj Grönholm2020-04-0814-11/+173
| | | | | | | | | | | | | | | | | | | | | | | | In progressive mode, single eye is rendered per frame. So full rendering of stereoscopic view takes 2 frames. This mode can be enabled from Q3DSViewerSettings, and for viewer from menu or with "--enableprogressivestereo" command-line parameter. Task-number: QT3DS-4076 Change-Id: Ie69e37da028743164b959036136485b88c61b009 Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* | Lazy load custom material subpresentationsJere Tuliniemi2020-04-141-0/+18
|/ | | | | | | | | Search through custom material string properties for subpresentation ids. Task-number: QT3DS-4090 Change-Id: Ia6a7227a9b9c5eb069f5670e7188644bf212ae8c Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Make attributes referenced for custom materialsJanne Kangas2020-04-073-9/+25
| | | | | | | | | | | | | | Mark custom material attributes as referenced always in order to make it possible to use setAttribute. Also fix file path error for images used in custom materials that also have "controlledproperty" attribute (=datainput controller) set. Task-id: QT3DS-4091 Task-id: QT3DS-4092 Task-id: QT3DS-4072 Change-Id: Icf39269ac3fed3f615cb5f7d52cd4e28176f5350 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix Temporal AA memory leak with dynamic layer resizeJere Tuliniemi2020-04-031-0/+2
| | | | | | | | Force texture deletes with dynamic resizing. Task-number: QT3DS-4080 Change-Id: I298bd398972fd51bc11cfd197c2f9cc92acb5f83 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Delayed loading: Load subpresentation with setAttributeJere Tuliniemi2020-03-262-1/+19
| | | | | | | | | | Trigger a load when changing the subpresentation attribute of a material. Also add the subpresentation to the activity list. Task-number: QT3DS-4090 Change-Id: Ief5c819bcf5cdf94702ba96e71491c8c898d02a6 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Make sure GoToTime works also when triggered at simultaneous activationJanne Kangas2020-03-255-9/+56
| | | | | | | | | | | Queue goto time command and skip rollbacking the newly activated slide in the case we receive both goto time and goto slide commands. Instead, go to specified time after the slide has been reaactivated (entered). Task-id: QT3DS-4001 Change-Id: I2dd8d6ec3a42dcd65f40adb7920b34183c50b062 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix editor picking with dynamic resizeJere Tuliniemi2020-03-231-1/+10
| | | | | | | Task-number: QT3DS-4081 Change-Id: I7c2232adc79cd788aeae8ffeb442461e26dfcef7 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Release layer cache texture when layer size changesJere Tuliniemi2020-03-231-0/+10
| | | | | | | | | Fixes dynamic resize for effects. Task-number: QT3DS-4085 Change-Id: Ifb52ce367af8b4edc7d03b4ed90980d8e510e662 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Disable temporal AA when layer texture size changesJere Tuliniemi2020-03-231-4/+6
| | | | | | | | | | | | | Turns off temporal AA on frames during which the layer texture size has changed. The texture change would cause temporal AA to leak memory. It also would make the antialiasing invalid since the temporal AA properties wouldn't apply anymore to the resized texture. Task-number: QT3DS-4079 Task-number: QT3DS-4080 Change-Id: Ia6dab001a63c2fcff591e7bc812260c1991639e9 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Remove the old shader result if compilation failsJanne Kangas2020-03-101-0/+3
| | | | | | | | | If shader is changed and compilation fails, remove the old result from shader cache. Task-id: QT3DS-4065 Change-Id: Ie5d13c0b3649dfb65f8053ff9d76b34c80ba9bcd Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Ignore controlled property changesJere Tuliniemi2020-03-091-0/+1
| | | | | | | | Controlled property caused asserts in different projects. Task-number: QT3DS-4084 Change-Id: I938df69d58935cabde070cadf1da77e2125479e2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix subpresentations in custom shadersJere Tuliniemi2020-03-054-13/+29
| | | | | | | | | | | | Custom shaders don't have presentationIds separately. The property value has to be interpreted as a presentationId. The main layer also has to be set dirty if custom shader subpresentation changes so that it animates even without other changes in the scene. Task-number: QT3DS-4083 Change-Id: I0fef13a8c7d99a74c524e459bb5490ff48158e26 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add depth function customization for custom materialsJere Tuliniemi2020-03-034-0/+53
| | | | | | | | | | | | | Example usage: <Pass> <Depth func="greater-than-or-equal" mask="false"/> </Pass> Task-number: QT3DS-3821 Change-Id: I8cf347026ad51ec80837e7ca87fcd836115c0d74 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add dynamic layer resizingJere Tuliniemi2020-02-2817-6/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean property to layer that enables dynamic resizing. The screen space bounds of the layer content are calculated and the layer resized to fit the content and exclude empty space. Padding property is also added that pads the resized layer so that minimal changes to the content won't trigger another resize. Padding can be set by pixel amount or by percentage of the size. To provide accurate 2d bounds, each active objects bounds are projected separately to the screen. A boolean property to only project combined bounds is provided but lowers the accuracy while limiting projections to 8. Known issues: - Temporal AA doesn't work with resizing correctly - Temporal AA leaks GPU memory when resizing - Editor picking doesn't work correctly with dynamically resized layers - Render to viewport doesn't yet support resizing Task-number: QT3DS-4030 Change-Id: Ibc727e078129eee15021cc97105b4cdf9a5a3196 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix blending issues in ordered groupJanne Kangas2020-02-261-3/+10
| | | | | | | Task-id: QT3DS-4058 Change-Id: I4d13a506892f668a0fb94bfe49879675a33d16a7 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Shader caching improvementsMiikka Heikkinen2020-02-257-19/+170
| | | | | | | | | | | | | | | | | | Added shader cache load error generation to some cases where it was missing. Properly pass the error to surface viewer. If there was a cache load error, allow exporting the generated cache. Added overloads to generate shader cache with specified compression level. Change-Id: I06d56114918ada23d46474e9466f6031ad8037e2 Fixes: QT3DS-4071 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Remove evaluator type datainput dead codeJanne Kangas2020-02-213-181/+0
| | | | | | | Task-id: QT3DS-3912 Change-Id: I76415b68bbe145bcc308263228358f69cac89c3c Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Do not cache datainput value if presentation is not readyJanne Kangas2020-02-211-0/+7
| | | | | | | | | | | This fixes the case of client (ineffectively) setting a value before presentation is ready, and then trying to set same value later again. This causes discard when the the incoming value is compared to the cached value. Task-id: QT3DS-3987 Change-Id: If41e0140a26514e5f5cf0f427d6c3d59090e2d43 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Register runtime versionsTomi Korpipaa2020-02-211-0/+4
| | | | | | Fixes: QT3DS-4068 Change-Id: I561413bd24a1401e36373aa88399ddf95c6af623 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Stereoscopic rendering optimizationsKaj Grönholm2020-02-202-68/+79
| | | | | | | | | Avoid some extra work while rendering in stereoscopic modes. Task-number: QT3DS-4044 Change-Id: Ia8f6bf07e4063f2da2054e4f384e28abe0a4b077 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Handle ordered attribute in runtimeJanne Kangas2020-02-173-3/+5
| | | | | | | | | | | | | | | Add missing handler for "ordered" attribute also on runtime side. Also, uncomment assert for unknown attribute, as silently ignored attributes can be tricky to debug. This does not fix the issue of non-ordered groups having wrong depth/alpha in Editor, but makes Editor and Runtime behave identically. Task-id: QT3DS-4058 Change-Id: Ic68d245143664d8ac4e74a6b3434f6ff476608a6 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix stereoscopic camera separationKaj Grönholm2020-02-171-2/+6
| | | | | | | Task-number: QT3DS-4066 Change-Id: I1b7e08c278ed7658f7990ae9ee6bc684f9203e04 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix rendering after stereoscopic mode switchKaj Grönholm2020-02-142-0/+8
| | | | | | | | | When stereoscopic mode is changed, mark layerdata dirty. This fixes at least presentations with temporalAA on. Task-number: QT3DS-4067 Change-Id: I99afda71f56e81d1a9b67ba1e2c882b9b33c97ee Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add size and format to textureid queryJanne Kangas2020-02-1111-1/+131
| | | | | | | | | | | Returns texture size and format for layer and material textures. Add corresponding test. Task-id: QT3DS-4005 Change-Id: I773715712dc78cf511f6c4d0095f5491834df311 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix distance field text caching logicJere Tuliniemi2020-02-111-5/+18
| | | | | | | | | | | | | | For whatever reason EndFrame is called without the text being rendered in the frame, so we need to keep both text and glyph caches alive during those passes. Previously only text hashes were saved, so now the glyphs are too to prevent building meshes again. Text and glyph hashes are also now not added twice to the lists. Task-number: QT3DS-4062 Change-Id: I3e5cddab788a0d974c98e533d131ed8ae24569ac Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Implement shader cache loading error handlingAntti Määttä2020-02-1012-16/+45
| | | | | | | Task-number: QT3DS-4040 Change-Id: Ie5f8284ab76cd4aa5f3ff0701457f4ef84c3e215 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add projectionMatrix uniformAntti Määttä2020-02-102-11/+19
| | | | | | | | | Also rename missnamed uniforms. Task-number: QT3DS-4048 Change-Id: I5cfd6cfb3c1f6ef2794ffe5571806f4a7ff59605 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Merge branch '2.6'Antti Kokko2020-02-102-2/+2
|\ | | | | | | Change-Id: If10420b5b0ab59abb5238e0dddf903b98d8ccbd3
| * Fix crash in autotestv2.6.02.6Antti Määttä2020-01-302-2/+2
| | | | | | | | | | | | Task-number: QT3DS-4053 Change-Id: Ie0723839c5c56f6978ec7a4a1258acf311d89d57 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* | Load component subpresentation when neededJere Tuliniemi2020-02-061-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | All components were iterated and included subpresentation loaded at the start. Now only components included in the master slide are loaded. Rest are loaded when the slide in which they reside is shown. Task-number: QT3DS-4057 Change-Id: I1e8f67f51fd452ac362c1020f7e9674bc86b7ec1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* | Update and fix documentationJanne Kangas2020-02-069-76/+81
| | | | | | | | | | | | | | | | Also move d_ptr variable to private in Q3DSDataInput. Task-id: QT3DS-4050 Change-Id: I91ded90a413e0e9f78b0d866823a686357e4b908 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* | Fix delayed loading data input crashJere Tuliniemi2020-02-051-1/+1
| | | | | | | | | | | | Task-number: QT3DS-4056 Change-Id: I4513214fa20e2c4b0e7a137fa97c648a644e0757 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* | Add warning for missing images during batch loadJere Tuliniemi2020-01-271-0/+2
|/ | | | | | Task-number: QT3DS-4046 Change-Id: I0eac5cb7b4f6f474f0c0ef38573349401e1901d8 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Optimize element attribute name hashingAntti Määttä2020-01-2223-318/+372
| | | | | | | Task-number: QT3DS-4041 Change-Id: I64ccd129b12053b057e5e992d89a05a2bc6cd33d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Don't render when scene is not changingAntti Määttä2020-01-2214-32/+51
| | | | | | | | | | Reduce CPU and GPU load by checking if the scene has changed and render only if it has. Task-number: QT3DS-4042 Change-Id: I54e447760f04fdad8d64319f326245175b471331 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Implement culling mode for materialsAntti Määttä2020-01-2116-21/+171
| | | | | | | | | | -Add culling mode for default material -Add Culling command to custom material. Task-number: QT3DS-1627 Change-Id: I519498ce4508c02527df628c36c0a62621e8e294 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Harmonize slide indexing between Q3DSPresentation and Q3DSSceneElementJanne Kangas2020-01-212-15/+19
| | | | | | | | | | | Make SceneElement slide indexing follow the original NDD scheme where slide index 1 corresponds to the first slide. (Note that this requires changes to applications relying on SceneElement client API.) Fix autotests. Add a remark about indexing in docs. Task-id: QT3DS-4034 Change-Id: I12328830193a148e2198ad74c450163e9e4600c9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix adding uTransform and vTransform to shadersAntti Määttä2020-01-201-1/+1
| | | | | | | | | These variables need to be added when any of the conditions are met, not when all conditions are met. Task-number: QT3DS-4043 Change-Id: I229fe4029a63ee4979dfe3fbf5d163fd95cfc40f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>