summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix loading pregenerated distance field cachev2.5.0-rcEskil Abrahamsen Blomfeldt2019-10-151-1/+2
| | | | | | | | | | | | | | | We can't assume the stride of the internal QImage data matches the width, since this is likely to be aligned to four bytes. Therefore we copy one scan line at the time instead. [ChangeLog][Text] Pregenerating distance field caches would sometimes lead to corrupted rendering. Fixes: QT3DS-3908 Change-Id: I3c30c6c707d6f220d852d6c067301ab4d468884c Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Remove extra memcopy from ASTC loadingJanne Koskinen2019-10-111-4/+4
| | | | | | | Read the data directly into the structure. Change-Id: I28289b66ce7bd59f747cc517388d51cf57213de8 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add anaglyph stereoscopic modes into opengl runtimeKaj Grönholm2019-10-1110-7/+72
| | | | | | | | | | | Implement also anaglyph red-cyan & green-magenta stereoscopic modes for opengl runtime. APIs for C++ and QML. Add options into viewer. Task-number: QT3DS-3981 Change-Id: Idb9f659b3799e954253e37045c1a3b2a55fb2779 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix materialdef special charactersv2.5.0-beta3Jere Tuliniemi2019-10-071-0/+1
| | | | | | | | | The materialdef xml file was not being read with a proper encoding. Task-number: QT3DS-3975 Change-Id: Iadc5ef1565b716a0d4a7330d5920648811c57ac6 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Use logging categories with all debug messagesAntti Määttä2019-10-074-28/+20
| | | | | | | | Task-number: QT3DS-3712 Change-Id: Ibb751d2ad462685f0ba39cef6a4d932708faac57 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix deferred loading of images after id changeAntti Määttä2019-10-041-6/+5
| | | | | | | | | | The effect system needs to use the class id instead of class name just like custom materials already do so that the uip parser can find the effect metadata. Task-number: QT3DS-3974 Change-Id: Ife5cf8a90e57d01126b25317f2c569ab24bc7766 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Use QtQuick dialogs in simpleqml exampleAntti Määttä2019-10-032-3/+8
| | | | | | | | | Use QtQuick dialogs instead of qt labs dialogs, which are not always available. Change-Id: I4a5bfe3a0d443f44cdcde6de8be1a8ee76fa99c2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add missing texture map to Models LibraryTomi Korpipaa2019-10-032-2/+2
| | | | | | | | | Requires QT3DS-3972 to work. Task-number: QT3DS-2383 Change-Id: I84873cb88a31db652e85710add832a75d8c474f4 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix rendering effects and caching effect textureAntti Määttä2019-10-031-3/+13
| | | | | | | | | | | The new effect texture caching doesn't properly handle inactive effects. Add active effect handling. Task-number: QT3DS-3970 Change-Id: I819c2083a9612574a97cc3c2a280c2273bc78d1b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix asserts when using effectsAntti Määttä2019-10-031-0/+1
| | | | | | | | Add missing break back. This doesn't fix the example, just the asserts. Task-number: QT3DS-3970 Change-Id: I6fd5e6e3c980c5b8be5911346927f5da5c4a21e9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Indicate material shader errors in EditorJanne Kangas2019-10-0215-30/+144
| | | | | | | | Task-id: QT3DS-3964 Change-Id: Ifac1df41862821c7220c3e9c88d34ceceaacbb0f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Adjust shadow depth bias range and step sizeTomi Korpipaa2019-10-021-1/+1
| | | | | | | | Task-number: QT3DS-2955 Change-Id: I89ff9d907fc466eb757ec14e66cb9030888b078c Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Bump qml module versionTomi Korpipaa2019-10-0111-19/+119
| | | | | | | | | | | Revision new APIs: asyncInit, shaderCache, exportShaderCache, stereMode, stereoEyeSeparation, textureId, and addImageProvider. Also fixed missing array in qt_attribution.json Task-number: QT3DS-3963 Change-Id: I3fc6ac38ff6f524a5268ad4706f4d0edcc0af6f3 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Indicate effect shader errors in Editorv2.5.0-beta2Janne Kangas2019-09-3010-27/+63
| | | | | | | | | | | | Show a pop-up if a shader fails to compile. Compilation takes place when the effect is added to a object in timeline. Requires both editor and runtime commits. Task-id: QT3DS-3598 Change-Id: Ie9b5a960773c16e00ef99bd0a05e581daf008365 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add afterRendering signal to the Q3DSSurfaceViewerJere Tuliniemi2019-09-302-0/+3
| | | | | | | | | This signal is sent after rendering but before the frame swap. Task-number: QT3DS-3962 Change-Id: I7501df1ad2590da75fac2a9eb3e626ecaffc0158 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Provide texture ids through the C++ APIJere Tuliniemi2019-09-3014-18/+114
| | | | | | | | | | | | | | Image, subpresentation and layer texture ids are now provided by the presentation via an element path. The cached layer texture id is also stabilized. Instead recreating it every frame, the last effect is just rendered to the premade texture. For each intermediate effect, a new texture is still created. Task-number: QT3DS-3959 Change-Id: I2ad2b81be9ae61373a0bfd963501823f012e9fcc Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add dynamic loading exampleAntti Määttä2019-09-2520-1/+534
| | | | | | | | Add example for deferred loading of images and subpresentations. Task-number: QT3DS-3941 Change-Id: Ica8a38238141f5aff92b09d1f953e3cb58d1109a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix background color clear with shadowsAntti Määttä2019-09-251-1/+3
| | | | | | | | | | | The shadow pass overwrites the clear color so reset it before clear. Task-number: QT3DS-3944 Change-Id: I8f3e65492edd9265f942a975c2e79050c08ba42f Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Change placement of the Transparency Mode propertyJere Tuliniemi2019-09-231-1/+1
| | | | | | | | | Move Transparency Mode next to Blend Mode since it basically determines if blending is needed. Change-Id: Ifeabfffe031fb6312f33b489a4c9b55e52c6e9f5 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix crash when using wrong vertex layout in custom shadersJere Tuliniemi2019-09-232-2/+6
| | | | | | | | | | The shader handle was cached before error checking, so the error checking would be skipped after the first failure. Task-number: QT3DS-3828 Change-Id: I950f0261199c0c30c44c583416b88dad9c376f0d Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add debug logging for element visibilities overridden by datainputJanne Kangas2019-09-231-4/+19
| | | | | | | | | | | | Output log when an element visibility is overridden via datainput and is no longer affected by slide transitions. This helps debugging visibility issues with presentations that use both datainput and slide initial values to control element visibility. Change-Id: I56fc39ff80851a16b0b2a90ca9d4c687d71750a3 Task-id: QT3DS-3951 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix loading subpresentations in preloadSlidev2.5.0-beta1Antti Määttä2019-09-191-1/+37
| | | | | | | | | | | Subpresentations were not loaded when calling preloadSlide. Add subpresentation loading handling into loadComponentSlideResources, which gets called when preloadSlide is called. Change-Id: I7bc8c5a799214534370af19e6e104e2846f38743 Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Handle animations without keyframesKaj Grönholm2019-09-191-0/+5
| | | | | | Task-number: QT3DS-3955 Change-Id: I50bea22f4232c9dbb1c63db00d3d967e911f7279 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add transparency mode selection to standard materialsJere Tuliniemi2019-09-1914-1/+78
| | | | | | | | | | | | | | | | | | | | ASTC textures would need to be decompressed upon loading to scan for transparency, or the texture files would need their own user-defined settings to enable transparency. Instead, as a work-around, materials can be forced to be treated as transparent without manipulating opacity. This is implemented with a transparency mode drop down list containing "Default", "Force Transparent" and "Force Opaque" options. "Force Opaque" can be used to force the material to be treated as opaque even when the textures used are transparent. By default ASTC textures are treated as non-transparent. Task-number: QT3DS-3904 Change-Id: I22255ffb2e2be5efea3e56466d58ddcc46490bb2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Add "astc" as an acceptable image suffixJere Tuliniemi2019-09-171-1/+2
| | | | | | | | Task-number: QT3DS-3903 Change-Id: Iff0b627f8dd1568ea09346068548e244cb4a9263 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix ASTC loadingKimmo Ollila2019-09-171-0/+5
| | | | | | | | Task-number: QT3DS-3903 Change-Id: I0f0cb49ea4d630f2af5e384569f1dd1a1880ae71 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add support for loading ASTC texture containersAndy Nichols2019-09-173-0/+207
| | | | | | | | Task-number: QT3DS-3903 Change-Id: Icf8d71e77a37d30ffc46322f8d03c9e94f63ac7b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Check more than S3/DXT support for compressed texturesAndy Nichols2019-09-176-12/+54
| | | | | | | | Task-number: QT3DS-3903 Change-Id: I23e50102857067324681c6ffaa0f166336214695 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Support QQuickImageProvider in the runtimeJere Tuliniemi2019-09-1716-10/+124
| | | | | | | | | | | | | | | With QQuickImageProvider the user can make a callback method returning a custom QPixmap or QImage to the engine without accessing the filesystem. Texture sourcepaths are set using an image url scheme. For example "image://colors/blue" where "image://" tells the runtime to look for an image provider, "colors" is the image provider id and rest are the image id the provider uses to create the image. Task-number: QT3DS-3761 Change-Id: I830649359f9969e957a972a0c08d0ede6e46ee78 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add fileids for actions and slidesAntti Määttä2019-09-171-0/+2
| | | | | | | | | This enables preserving slide and action ids when saving presentations. Task-number: QT3DS-3816 Change-Id: Ibecf990745990ad0f9016865f7e78992a70f7a9b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Prevent crash when trying to preload non-existing slideAntti Määttä2019-09-171-0/+4
| | | | | | Change-Id: I342d6a8b5ee85d3836eef1fece0dd87b5efed215 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix distance field text rendering with alpha testAntti Määttä2019-09-173-5/+10
| | | | | | | | | | Disable rendering when alpha test is enabled. Task-number: QT3DS-3945 Change-Id: I59f7a8466f93f6c1d41cfab224cd9443ef03147f Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* Fix string comparison typesAntti Määttä2019-09-171-3/+6
| | | | | Change-Id: I4ffc26f35849b1ad86612393992e485ecd2fa240 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Remove unused DepthSampler property from Bloom effectJanne Kangas2019-09-131-1/+0
| | | | | | Change-Id: I9c22f5d8cc1e382ba8831e5099b5a5d1222b2a91 Task-id: QT3DS-3937 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Implement two-pass rendering for transparent objectsAntti Määttä2019-09-1234-335/+1041
| | | | | | | | | | | | | | If object has both opaque parts and transparent parts it will be rendered incorrectly due to no z-buffering. Add two-pass method to render the opaque and transparent parts separately. - Add opaque pixel check to transparency check of images. - Add alpha test rendering to default material shadows too. Task-number: QT3DS-3515 Change-Id: I9700b8fb463df9143c5bb9cbe66c7570081ebf5c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Improve stereo camera positioningKaj Grönholm2019-09-121-11/+4
| | | | | | | | | | | Simplify stereo cameras separation while also fixing camera rotation bug. Task-number: QT3DS-3899 Change-Id: Ic62afeea8410164664e6dd0ba9db0aad81f4fa63 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Implement shader cachingMiikka Heikkinen2019-09-1235-579/+896
| | | | | | | | | | | | Currently loaded shaders can now cached with an API call in either source code or binary format. It is necessary to do it that way as the shader cache can only be created in the target hardware. Task-number: QT3DS-3914 Change-Id: I094e8624943904c311ada2259a84b8c183f792f5 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Stereoscopic improvementsKaj Grönholm2019-09-115-27/+77
| | | | | | | | | | | | Make left & right eye camera nodes pointers, fixing e.g. presentations with specular reflection. Use separate textures for fixing temporal AA. Don't allow eye separation become negative. Task-number: QT3DS-3899 Change-Id: Ide4d26d293c37b16048e2691ad51a32b8d4cc276 Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* Make visibility setting for elements in master slide persistentJanne Kangas2019-09-116-5/+55
| | | | | | | | | | | | | | Make datainput-driven visibility setting persistent over slide changes, for elements that are on master slide. This prevents slide initial value from overriding the user set visibility. Override takes place at first DI-driven visibility change. Change-Id: I799872ebd9834df9e74dd1e5e53a59c57e02255f Task-id: QT3DS-3925 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix imported assets animations not appearing bugMahmoud Badri2019-09-091-1/+1
| | | | | | | | Rest of the fix is in the editor side Task-number: QT3DS-3921 Change-Id: Ie372a21ce70f373a3ca90a1236ca1d96ff7d418f Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add support to get a bezier curve extreme valuesMahmoud Badri2019-09-056-6/+111
| | | | | | | | | Add logic to get the extreme values of a curve segment. This is used by the studio to fit an animation curve. Change-Id: I65564802524bfd49793624a560d98cc67d22e055 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix eliding when text is alignedKaj Grönholm2019-09-051-2/+9
| | | | | | | | | When text element is aligned to left/right/top/bottom, text string maximum width/height shall be half of the text area size. Task-number: QT3DS-3776 Change-Id: I173375c09a4e29274f0882f1b067079288336e88 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Improve viewer stereo commandline optionsKaj Grönholm2019-09-051-0/+19
| | | | | | | | | | Fix stereomode and add eye separation option. Task-number: QT3DS-3899 Change-Id: I87ecb31d2e457fdedc96586e5d72ff14e2754e73 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Improve slide element finderJere Tuliniemi2019-09-051-0/+1
| | | | | | | The slide iteration can be stopped after finding the correct slide. Change-Id: I82b1385d8c4eadd21b27094c6003dfc4f90ee484 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Convert GGX specular function to isotropicAntti Määttä2019-08-292-92/+49
| | | | | | | | - Remove anisotropic version and remove unnecessary function parameters. Change-Id: I91f306386db6041ffaedc4225f64cf8f27e8fd82 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Stop animation when property is controlled by datainputJanne Kangas2019-08-294-0/+51
| | | | | | | | | | | | Disable animation for the target property when datainput value is set. This is to prevent running animations from overriding datainput control, which happens by default in runtime engine due to ordering of scene update sequence. Change-Id: I148d7fd80ad01f4ec5ad1d5ba69ecc74865d27fb Task-id: QT3DS-3896 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add property to Camera to enable frustum culling when neededAndy Nichols2019-08-2913-14/+29
| | | | | | | | | | By default frustum culling is disabled because for most scenes all items are always visible. There is a not insignificant cost to doing frustum culling, so it shouldn't be the default behavior. Change-Id: Ibc0c0a4bd1cf65a215256de9ec22ca1d97eb6de5 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Disable Depth Pre-pass by defaultAndy Nichols2019-08-292-2/+2
| | | | | | | | | | | This is an anti-optimization on tiled renderers and doesn't provide much performance benefit on even desktop hardware. This patch makes the depth pre-pass opt-in instead of opt-out. Change-Id: I73cdc0aac5e5c07977085eefd1fad7ba890d0fdb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Remove some warnings from Qt3DSDMAnimation.hMahmoud Badri2019-08-282-7/+7
| | | | | Change-Id: Id3c6c202233283c6e05f78f59b9d75fff90344fc Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Unify timeline unit to millisecondMahmoud Badri2019-08-2621-277/+239
| | | | | | | | | | The studio and runtime had mixed timing units (seconds and milliseconds) . This commit unifies the timings to milliseconds. The values are however kept saved in the UIP file in seconds for backward compatibility and also cause it is more compact (ex: 1 vs 1000). Change-Id: Id3515ed90fdb8eb027c581aef9598b02b974a40e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>