summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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-2117-21/+172
| | | | | | | | | | -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-213-17/+21
| | | | | | | | | | | 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>
* Remove unused and duplicate codeAntti Määttä2020-01-205-217/+2
| | | | | | | | | -Remove tree traverse functions from actimation manager. -Remove duplicate element helper code. Change-Id: Ibf23c58755024a7374b8279861e4aad8fbcdd7c7 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Load referenced material assets upon useJere Tuliniemi2020-01-164-15/+117
| | | | | | | | | | | | | | | | | When using delayed loading, assets used by materials inside the material container are not loaded upon startup anymore. Instead the assets are loaded when entering the slide in which the material is referenced. This also fixes referenced materials that refer to an animatable material in another slide. Task-number: QT3DS-3100 Change-Id: If55c73e8f91389f3c47ae16357ebe6a473f43585 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Add toggle for disabling ambient occlusionJanne Kangas2020-01-1512-2/+16
| | | | | | | | Task-id: QT3DS-4032 Change-Id: I27c6c7ad2a66fac0b654002933fc3216ecf8879c 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 ordered groupAntti Määttä2020-01-1318-199/+417
| | | | | | | | | | | Add ordered property to group, which disables automatic depth sorting for that group and all it's children. The group as a whole gets sorted with other objects as if it was one object. Task-number: QT3DS-3820 Change-Id: Iea71917fc78f4c543aa944d851c77b6794bd7d80 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix setting value for uninitialized attributesAntti Määttä2020-01-134-2/+38
| | | | | | | Task-number: QT3DS-4033 Change-Id: Idd1af454c066a359e85c384124e3f8fe8466f4f5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix SceneElement::currentSlideIndexJanne Kangas2020-01-132-21/+35
| | | | | | | | | | | | | Fixes issue of current slide change signals not working from subpresentations. (Does not touch indexing conventions in SceneElement or Presentation.) Task-ID: QT3DS-3015 Change-Id: I74ef95d72efa1fc75674081e242c9f5526decf77 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>
* Add env variable to configure shader precisionAntti Määttä2020-01-131-10/+38
| | | | | | | | | | Add QT3DS_PRECISION and QT3DS_SAMPLER_PRECISION to enable changing the used precision in the shaders. Task-number: QT3DS-1994 Change-Id: I5816fccf25a1bbebdb29f8d9db94832eea2fe97f Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add C++ API method to export and import shader cache as QByteArrayMiikka Heikkinen2020-01-133-14/+76
| | | | | | Change-Id: I5492e2590195b07e0e582e48a30d87194b372d3d Fixes: QT3DS-4036 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix assert when scanning hdr image for transparencyAntti Määttä2020-01-101-0/+1
| | | | | | | | Add the missing enum to the switch. Change-Id: I617df9d9c18c3769d6bb61f0fa7eb529baed0a0a Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix default material normal mappingKaj Grönholm2020-01-081-1/+1
| | | | | | | | | | Fix issue after shader cleanup patch c4ed0d6a. After this runtime autotests pass again. Task-number: QT3DS-4035 Change-Id: I90a4a1daf83e17028a32eb5de48a9ce40f8d474f Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Optimize and cleanup shadersAntti Määttä2019-12-2749-818/+367
| | | | | | Change-Id: Ia27680e20f73ffe645d5a336fad7024e67a8389b Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix distance field text alignmentJere Tuliniemi2019-12-161-33/+45
| | | | | | | | | | | | | | Distance field bounding boxes were working wrong compared to the old text rendering. When text alignment is set to right, the bounding box has to be set so the right side is in the center of the object. Previously the bounding box remained the same, giving an illusion that the text just shifted to the left, when it really just aligned to the right of center. This should make eliding work correctly too. Task-number: QT3DS-4020 Change-Id: I5c946c07f49eb4ca4ce63b45f897def41053ae24 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Minor perf logging tweakKaj Grönholm2019-12-134-11/+24
| | | | | | | | | | | Show more clearly total runtime & application startup times. When QT3DS_ENABLE_PERF_LOGGING isn't defined, only these total times are shown. Task-number: QT3DS-4028 Change-Id: I1d9fe8bab5ed32584b2ad1c09b14cb01d25dc82f Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Support RGBE hdr images directlyAntti Määttä2019-12-139-639/+404
| | | | | | | | | | Do not convert RGBE images to 16-bit floating point, but use then directly in the shaders. Task-number: QT3DS-4031 Change-Id: Iecfc775247553d5fd8976c77c572435462b79e64 Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Document usage of QT3DS_ENABLE_PERF_LOGGINGKaj Grönholm2019-12-121-0/+43
| | | | | | | Task-number: QT3DS-4025 Change-Id: If2e3eadd73cf76457a06aaab224843767a31ecff Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add project setting for automatically flipping compressed texturesJanne Kangas2019-12-1215-30/+81
| | | | | | | | | | | Flip ktx and astc textures in shader if project settings has flipCompressedTextures flag set as true. Also, fix bug in shader generator UV flipping code. Task-id: QT3DS-4015 Change-Id: Ic406569c15e172c513f5d412ba41ab84348a392b Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Prevent loading subpresentation multiple timesAntti Määttä2019-12-101-2/+3
| | | | | | | Task-number: QT3DS-4027 Change-Id: I4612c54e39af44a2458052546f25a1d48a4e0ca4 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add env flag for selecting OpenGL backendJere Tuliniemi2019-12-091-26/+35
| | | | | | | | | | | Implementation copied from Quick3D. OpenGL backend can be selected by setting QT3DS_FORCE_OPENGL_BACKEND to 1, 2 or 3. ES2 backend with 1, GL3 backend with 2 and GL4 backend with 3. Task-number: QT3DS-4023 Change-Id: I484770240f377b3bfe897f31c986deca5805607f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Improve perf logging #2Kaj Grönholm2019-12-0912-87/+143
| | | | | | | | | | | | | | | Improve startup perf logging, including: - Move outputting startup perf logs into better place. Previously only part of the logs were printed as output happened too soon, now printing at first frame rendering. - Show also amount of calls and cumulative timestamps. - Improve log labels formatting. - Add more logging points into hot spots. Task-number: QT3DS-4021 Change-Id: I7db5a11ff10be1ccb691f82b10161e8ba7c316a6 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix opaque pixel detectionJere Tuliniemi2019-12-051-2/+3
| | | | | | | | | | | The scan would stop upon first transparent pixel, so subsequent opaque pixels wouldn't be detected. Task-number: QT3DS-4012 Change-Id: I2b12104393433ef142812234fec5ee5ca6732691 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix qml subpresentation alpha premultiply settingAntti Määttä2019-12-042-2/+2
| | | | | | Task-number: QT3DS-4017 Change-Id: Ia5888f3c44f2ef2dc981a2a13893a21a28f01f41 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Improve perf logging & timersKaj Grönholm2019-12-0313-78/+91
| | | | | | | | | | | | | | | | | OpenGL runtime contains perf timers but they are not documented so probably not much used. Switch to using QT3DS_PERF_SCOPED_TIMER macro instead of direct SStackPerfTimer usage. Then SStackPerfTimer debugs overhead can be fully removed when QT3DS_ENABLE_PERF_LOGGING is not defined (default). Print first frame render time when qt3ds.perf_info is on. Task-number: QT3DS-4021 Change-Id: Id11a1c5bb8bf24f545e9bceb333212f345b29bb7 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix subpresentation transparent clearAntti Määttä2019-11-2911-34/+115
| | | | | | | | | | | | | | Always include alpha channel for subpresentations and properly handle clear color setup. It needs to setup differently when we render to texture vs viewport. When rendering to viewport, if the clear color contains alpha, we need to blend the clear color to the target instead of clearing the target. Also we need to blend the scene color to the matte color, when matte and scene color are enabled and the scene color contains alpha. Task-number: QT3DS-4008 Change-Id: Ic2b3bac8ea586cbd205421c8efd21c1e3e49abd4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix q3dssurfaceviewer auto testsKaj Grönholm2019-11-291-39/+36
| | | | | | | | | | Matte needs to be separately enabled. Adjusting to slide manipulation logic changes. Task-number: QT3DS-4013 Change-Id: I7351a820aaa5340cdda69dcc9c3628cc016e9041 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix matteEnabled viewer settingKaj Grönholm2019-11-291-1/+1
| | | | | | | | | By accident it kinda worked as boolean false = 0 so constructor QColor(QRgb color) was used for setMatteColor(). Task-number: QT3DS-4013 Change-Id: I1194f5044818ef2d97be5ca3538e2640e5f5dbd2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix building & running runtime autotestsKaj Grönholm2019-11-284-2/+18
| | | | | | | | | | Building shouldn't change on mingw while enabling QT3DS_AUTOTEST_EXPORT on other platforms like before a06fe05660. Task-number: QT3DS-4014 Change-Id: Ic0f8ba487c3e8843312fa79f3f21d7c519ce71ce Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Detach depthstencil attachment after shadow passJanne Kangas2019-11-271-0/+2
| | | | | | | | Change-Id: I8d2cb03b4c95d87b7906779d5ed18528469d862c Task-id: QT3DS-3929 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* Check Force Transparent after checking for alpha testJere Tuliniemi2019-11-271-6/+6
| | | | | | | | | | | | | | | No need to do alpha testing for objects with Force Transparent enabled. Also fixes a depth ordering bug for Force Transparent objects that still affects alpha tested objects. Force Opaque is still checked before so that alpha testing is disabled if opaqueness is forced. Task-number: QT3DS-4009 Change-Id: I502d368212c8c34a4f91e1a80372b3597524de1b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Premultiply subpresentation clear colorAntti Määttä2019-11-211-0/+5
| | | | | | | | | Just as the other clear colors, subpresentation clear color needs to be premultiplied by alpha before clear. Task-number: QT3DS-4008 Change-Id: Ie942ed43c0aad6454458cfd3b1a3217afad19277 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Always handle datainput-driven activity changesJanne Kangas2019-11-203-4/+11
| | | | | | | | | | Handle datainput-driven eyeball (activity) change always regardless of element activation status in activation manager. Task-id: QT3DS-4003 Change-Id: I6ca0ec834d2ccbc3850c0b2849caee058b2d778d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix crash when effect shader code is changed externallyJanne Kangas2019-11-202-18/+9
| | | | | | | | | | Remove items in correct manner when iterating m_Contexts vector. Crash fix also requires Editor-side commit. Change-Id: I46ab3ae406bb837f204d47b22f95e87305df52e0 Task-id: QT3DS-3990 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Always update ImagesAntti Määttä2019-11-201-3/+4
| | | | | | | | | | Material properties should be updated always, but changes to material images use Image type so they didn't update when they should have. Always update image properties too. Task-number: QT3DS-4002 Change-Id: I8df3649c607f88fc08463c7e101c495612f5a0f5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Allow setting timeline value when element is about to activateAntti Määttä2019-11-206-6/+33
| | | | | | | | Task-number: QT3DS-4001 Change-Id: I9fbb1367999d2a3e3bea6520f9e59a820ef50c28 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Support LEGACY_ASTC_LOADING with delayed loadingJere Tuliniemi2019-11-201-0/+2
| | | | | | | | | | Images were never loaded if both the legacy flag and delayed loading were on. Task-number: QT3DS-3999 Change-Id: I3729c8d111236ed88c2d3db6dadd269cae365f01 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix crash when retrieving a non-existent texture idJere Tuliniemi2019-11-201-2/+4
| | | | | | Task-number: QT3DS-4004 Change-Id: I2ce1af6e07ab18a835e21de5e92dc2ba6509229d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Force shader compilation on effect activeJanne Kangas2019-11-071-0/+2
| | | | | | | | | | Force compilation also for effect shader as it becomes active, to catch compilation errors in Editor. Change-Id: Ic4db0ab32de6ed6436487d4d2cf4d188206a247e Task-id: QT3DS-3598 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix component behavior when the parent group is inactiveJere Tuliniemi2019-11-074-1/+9
| | | | | | | | | | | Call GoToSlideIndex upon activation if a slide change has been queued for an inactive component. Task-number: QT3DS-3997 Change-Id: I63489cd438428546b04883d04ee5d40b04e1cb78 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>
* Store line feeds as substitute characters in UIPJanne Kangas2019-11-062-0/+8
| | | | | | | | | | | To avoid using real line breaks in UIP file for string-typed values, replace \n sequence with a non-printable unicode char at file save. Revert this at file load. Change-Id: I215a88c4d85bc2c0c3b63f31d6cd1cfdf20b16ca Task-id: QT3DS-3993 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix crash when queueing attributes with delayed loadingJere Tuliniemi2019-11-042-9/+12
| | | | | | | Task-number: QT3DS-3996 Change-Id: I24b96b4806cb24a92b199562d3f033ead47696d1 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Merge remote-tracking branch 'origin/2.5'Miikka Heikkinen2019-11-0185-156/+1150
|\ | | | | | | Change-Id: Ia7d71a74df92909071c0806b70b783dba6feb1fe
| * Add legacy compile option for astc file typesv2.5.02.5Janne Koskinen2019-10-251-2/+4
| | | | | | | | | | | | | | When enabled astc file is not loaded until needed for texture creation. Change-Id: I94d49087eaa1ba288372d7668c68ab1876255e01 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
| * Doc: Add links to examplesMats Honkamaa2019-10-211-0/+10
| | | | | | | | | | | | Task-number: QT3DS-3960 Change-Id: I74a48bb170aa15a454ddd285c10ddb5c4f2baf62 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| * Fix datainput controlled component activity changev2.5.0-rc3v2.5.0-rc2Antti Määttä2019-10-181-1/+6
| | | | | | | | | | | | | | | | | | | | Datainput control check needs to be done in the Update too. Task-number: QT3DS-3988 Task-number: QT3DS-3989 Change-Id: Iab628ab5fcab57379c23ed8122d24d37f66b303b Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
| * 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>