summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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-1511-1/+12
| | | | | | | | 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-1317-199/+415
| | | | | | | | | | | 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-271-170/+171
| | | | | | 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-137-257/+338
| | | | | | | | | | 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-0312-78/+86
| | | | | | | | | | | | | | | | | 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 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-281-0/+8
| | | | | | | | | | 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>