summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix wrong lib paths in android buildv2.8.0-rc2Antti Määttä2020-10-167-0/+47
| | | | | | Task-number: QT3DS-3982 Change-Id: Ifc01400a6756e3ee66765a5b37fa9d805f58f99c Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Improve runtime build options documentationKaj Grönholm2020-10-163-4/+27
| | | | | | | Task-number: QT3DS-4185 Change-Id: Id23f07dc07547c37643081a5116b84be3ccd0d4b Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix ghost images in presentationsAntti Määttä2020-10-162-2/+2
| | | | | | | | | Set default minification filter to not use mipmaps. Task-number: QT3DS-4188 Change-Id: I2263c8b17879e4ff1a69097ae0b04c3309003a67 Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix rendering problems with ordered group and alphatest objectsAntti Määttä2020-10-162-80/+82
| | | | | | | | | | | | | | | | Change the logic of the ordered group rendering. Previously all objects in ordered group were drawn in one go as opaque objects and alpha-test objects were all rendered in transparent pass. - Change the logic so that ordered property only affects transparent objects when depth test is on and all if it is off. - Allow adding alpha-test objects to both opaque and transparent object lists and only draw the respective parts in the each pass. - Change transparent object rendering into one pass. Task-number: QT3DS-4155 Change-Id: I53fd6acfc0a887e01996306b5eef0c14c97e18ad Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Revert "Fix blending issues in ordered group"Antti Määttä2020-10-161-9/+3
| | | | | | | | | | The commit was basically no-op, except when rendering depth pass, which incorrectly draws the depth. This reverts commit 7cb740b7dc1e7a660eaaab41cff2e4d76a9fd99f. Change-Id: If6a5dd8ca0448569f177a81229710775bfb7985a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix images having subpresentations and mipmapsAntti Määttä2020-10-161-4/+7
| | | | | | | | | Generate mipmaps each frame when they are used by images with subpresentations. Change-Id: Ic516d4e825ee81882601c4124381a5b3940d151d Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix assert when loading qml streamerAntti Määttä2020-10-161-10/+13
| | | | | | | | Fix assert and memory leak when registering qml streamer if it has already been registered. Change-Id: I6af73abb2c9806622dfde4a75a67a08b3391b2a5 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Manually convert snapper macros to shader codeAntti Määttä2020-10-162-15/+56
| | | | | | | | Use manual conversion just like effect code instead of shader compiler macro concatenation to convert the snapper macros to actual shader code. Change-Id: I3b26e3bf09df298f2d3f45f3690b3ac310c46ce2 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Convert Material library to use imagesAntti Määttä2020-10-1630-142/+227
| | | | | Change-Id: Ic7754a206a0c0205d71ce78bc42d90c10abbba25 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add option for always premultiplied astcKaj Grönholm2020-10-154-0/+29
| | | | | | | | | | When QT3DS_ALL_ASTC_PREMULTIPLIED is defined or set as environment variable, all astc images are considered to be premultiplied. Task-number: QT3DS-4182 Change-Id: Ibe039b65322f252158bd38a2ca5b57d270c3d209 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix custom materials now showing before reloadAntti Määttä2020-10-147-38/+21
| | | | | | | | | Use property name instead of image id, since the id is only available after serialization. Change-Id: Ie00bac32e61607ce481e5eb74a9e61c2d4fd317e Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix issues in dynamic object texture changeAntti Määttä2020-10-1416-60/+201
| | | | | | | | | | | | | -Add backwards compatibility with older presentations. -Get dynamic object with instance handle. -Set empty string to texture if it is not a reference. -Create images for dynamic custom material textures. -Add transform to effect textures and fix flipping the uv coordinates. Task-number: QT3DS-4063 Change-Id: I5c72087e57d51679b321f017367cf93e56a32786 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Implement image filteringAntti Määttä2020-10-1416-5/+89
| | | | | | | | | | This is needed to support custom material texture filter modes when they are being implemented using images. Task-number: QT3DS-4183 Change-Id: I9f16a9347379872a8f04ebdd08785df345939a70 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Use images with dynamic object texturesAntti Määttä2020-10-1414-310/+177
| | | | | | | Task-number: QT3DS-4063 Change-Id: Ia07f21be65ebda9733773504eb2e0ddce4009fab Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Split SDynamicObject from graph objectsAntti Määttä2020-10-1414-166/+168
| | | | | | | | Add SDynamicGraphObject and derive SEffect and SCustomMaterial from it. Change-Id: I97fc561069d72ab550eebcad76c240a7fb5ad142 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Don't switch deactivating component slideKaj Grönholm2020-10-122-1/+12
| | | | | | | | | | When component is about to become deactivated, don't proceed with slide switching as that may cause deactivation not proceeding. Task-number: QT3DS-4169 Change-Id: I1157f8a76afbc4d3592486a05fa2eb7607ae55ea Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add RGBA_ETC2 format to scan for transparency functionAntti Määttä2020-10-081-0/+1
| | | | | | | This prevents assert in debug mode. Change-Id: I90d8bd5fe93d857bfef3f57104a840c343fced02 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix autotestKaj Grönholm2020-10-081-2/+2
| | | | | | | | | Now sourcepath with and without file extension return actually same texture id. Task-number: QT3DS-4179 Change-Id: I8a4936a86ca59ff756dc8cbe3fbfff489b587318 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Improve attributes handlingKaj Grönholm2020-10-084-1/+23
| | | | | | | | | Add some missing attributes and disable node OnSpecificPropertyChange assert same way it is disabled for other objects. Task-number: QT3DS-4180 Change-Id: I9966fb98129ed5c8455484e705f7f89a68a530b7 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix excessive boldness on thin textEskil Abrahamsen Blomfeldt2020-10-084-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the distance field curve is at 0.5, the fragment actually contains the edge of the glyph, so we shouldn't fill the pixel completely. The smooth range should rather be given by the area spanned by the fragment (approximated by the fwidth() function) and centered on the edge. The result was that glyphs would look bolder than they should, especially visible at low resolutions with thin outlines (thus it could be worked around by enabling SSAA, which would render the glyphs at a higher resolution). This is a fix for the boldness part of QT3DS-4175. For the glyph corruption, this is actually due to features of the glyphs being thinner than a pixel, in which case both fragments may sample outside the outline, and we do not get valid values back from fwidth(), which is a known draw-back of this antialiasing strategy. Task-number: QT3DS-4175 Change-Id: Ide8e190eed766d04fdccf203c4ecfedbb93c6247 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix enabling CullFace renderstatev2.8.0-rcAntti Määttä2020-10-061-1/+1
| | | | | | | The enable state name is CullFace and not Culling. Change-Id: I9b5240639adcc805b4c34ac71547ac5afe524a43 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix crash when slide change occursAntti Määttä2020-10-0610-258/+211
| | | | | | | | | | The buffer manager needs to use resolved paths for each image loading function. Also convert to use QString to avoid unnecessary string conversions. Also fix image loading task to use resolved paths. Task-number: QT3DS-4177 Change-Id: I79fae56a8f49ccbdcaed1fa9eb9a9d875583d0dd Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Revert "Fix slide activity changes"Kaj Grönholm2020-10-051-5/+0
| | | | | | | | | This reverts commit 5f8471a92868a06298ef0e0f1047d20491ac7f46 as it causes issues with existing projects. Change-Id: I903b104c325323d1b6fb53c1313921ee593c156b Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix slide activity changesKaj Grönholm2020-10-021-0/+5
| | | | | | | | | | | When doing multiple slide switches at the same frame, activity (visibility) didn't update correctly because even empty elements caused activity changes. Task-number: QT3DS-4169 Change-Id: Ib2dec31ee6b33487261b73cf5550a090ce91513e Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Try to resolve images only onceKaj Grönholm2020-10-012-8/+24
| | | | | | | | Task-number: QT3DS-4176 Change-Id: Ib1bcdd201a973122a36550971d9ce16148ef8d28 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Fix incorrect data input behaviorTony Leinonen2020-09-283-3/+15
| | | | | | | | | | | | | | When attempting to change time check if the parent becomes active. If an object is inside a group or is a child object the parent is the one which becomes active. Remove the first activity check. This is already being checked once after. Checking too early doesnt allow moving objects and changing slide in the same frame. Task-number: QT3DS-4166 Change-Id: I5f64828605c11756e61026ffc60a3b73b3a1f197 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Prevent duplicates in searchPaths and reverse itTomi Korpipaa2020-09-282-7/+9
| | | | | | | | | | | | The first 3 paths in the searchPaths are for finding the other things we need to search for, the last ones are for source paths. Reversing the order drops the required search count in a usual case from 4 attempts to 1 or 2. Task-number: QT3DS-4172 Change-Id: I0d7665566be6b8a9d5e7b918f7596f70126ad958 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Fix signal autotest for LinuxTomi Korpipaa2020-09-281-0/+3
| | | | | | Change-Id: I03537c60337f8cdb4183ca8e50e9f68d7a7b8148 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Add signal objectv2.8.0-beta1Kaj Grönholm2020-09-256-9/+37
| | | | | | | | | | Add signal object type and use it instead of dummy group in activateactions autotest. Task-number: QT3DS-4165 Change-Id: Id10fcc95e3a8f9009db71e6c2d640a593e633d67 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Unify source path usage in runtimeAntti Määttä2020-09-2413-151/+336
| | | | | | | | | | | There are several fixes done to source paths before their usage, but they are done in different places. Put these all into function and call this function before using the source paths. Task-number: QT3DS-4162 Change-Id: I0d3e3fd2db0cb11c6e9cb28fb3054568884059db Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Remove unused codeAntti Määttä2020-09-211-4/+0
| | | | | | Change-Id: I686f6e333e2b1d918de111201c4a600dce1f9688 Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Remove unused functionsAntti Määttä2020-09-211-22/+0
| | | | | | Change-Id: I9b57152d059b7e2ea8eed6ce3fbb47e4005e735a Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add support for onActivate and onDeactivate ActionsKaj Grönholm2020-09-2114-32/+178
| | | | | | | | | | | | | Add new Action types onActivate and onDeactivate. When assigned, these will get triggered at object timeline start and end times. Using these it is possible to trigger events at specific times during animation. Example and autotest case included. Task-number: QT3DS-4128 Change-Id: Ib973b479a1de47745089d41c5764c2a1747ec95e Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Ignore schema when comparing texture keysJanne Koskinen2020-09-141-0/+5
| | | | | | | | | | Use only filepath as the key for textures. Removes double loading of textures accessed in different style. Task-number: QT3DS-4154 Change-Id: I46dbfcef35944b61d74c821374d103a0d1b65134 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Try loading files outside of UIP/UIAJanne Koskinen2020-09-141-0/+14
| | | | | | | | | | Delayed loading ignores files not listed in UIP, try loading them if not found from the texture map. Task-number: QT3DS-4159 Change-Id: I32011390976493e9c43126b6d162516fa24bca6a Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix disable depth test and disable depth prepassTony Leinonen2020-09-142-3/+7
| | | | | | | | | | | | | | Disabling depth prepass in the editor never actually disabled the prepass. Flipping inEnableTransparentDepthWrite boolean corrects the if statement. Transparent objects were placed behind opaque objects when disable depth test was enabled in the editor. When disabling depth test objects are now drawn in a single pass with alpha test off. Task-number: QT3DS-4011 Change-Id: Ifb85520a3f9fd20d29e24c721623fd103b5b3797 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Bump version to 2.8Tomi Korpipaa2020-09-141-1/+1
| | | | | | Change-Id: I4364061173a1dfcb23922fd662a0c1d46883a37d Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Fix RGBE specular map shaderAntti Määttä2020-09-141-8/+19
| | | | | | | | | | When RGBE map is set into the specular reflection map, it needs to be read in shader as RGBE instead of RGBA. Task-number: QT3DS-4160 Change-Id: Ib4baf0cf775d779a5b679ff131f89b9c893bbec7 Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Fix function parametersTony Leinonen2020-09-091-4/+4
| | | | | | | | | | DepthWrite variables were in the wrong order which could cause unwanted behavior. Task-number: QT3DS-4158 Change-Id: I39ba2015dfeb3530d12af696d23ba0feab21ea21 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Disable alpha test for screen blend modeTony Leinonen2020-09-091-1/+2
| | | | | | | | | | | Transparent objects alpha test was set to true when its opacity was 100% which caused problems with screen blending mode. Task-number: QT3DS-4110 Change-Id: Ie12e36e442fb265cad6141022200e99b28a9c4cc Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Fix m_shaderCacheCompression typeKaj Grönholm2020-09-081-1/+1
| | | | | | | Task-number: QT3DS-4157 Change-Id: I4002368dd9b1f9267930e98319d31b3c8bb8b1fb Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Support automatic detection of texture file extensionKaj Grönholm2020-09-042-5/+68
| | | | | | | | | | | | | | | When using setAttribute() it is now possible to give filename without the extension and engine automatically locates the most suitable existing file. If preferKTX is set, compressed texture formats (ktx, astc, dds) are preferred over non-compressed ones (e.g. png, jpg). The behavior is similar to Qt Quick Image automatic detection of file extension. Includes autotest to confirm the behavior. Task-number: QT3DS-4059 Change-Id: I1d4ab0d86b34f5deb704d450e5c36e86afde7d3b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix stereomode crashKaj Grönholm2020-08-251-0/+1
| | | | | | | | | Set correct parent node for left & right eye cameras. Task-number: QT3DS-4152 Change-Id: I08d80525360b9925c896320f17842bc4be486991 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix white flash in first frameAntti Määttä2020-08-171-2/+5
| | | | | | | | | | Run render tasks also before prepare step so that the images are loaded for it. The prepare step doesn't work properly if the images have not been loaded and generates wrong materials for first frame. Task-number: QT3DS-4131 Change-Id: I7a3f5fb08f915a31dd291c3c147d8f078ecee908 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix performance timers compilationJanne Koskinen2020-08-171-1/+1
| | | | | | | | Add back the name for the argument. Fixes: QT3DS-4153 Change-Id: Ifee13fe048069298aeeda519c2bfd8ef15ffc6f5 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix stereoscopic rendering with subpresentationsKaj Grönholm2020-08-126-6/+18
| | | | | | | | | | Viewports of subpresentations should not be reduced in stereoscopic modes. Task-number: QT3DS-4141 Change-Id: Ie96ff296bec2d11b215f36e08df23911f18fbba2 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Allow getting texture id from subpresentation layerAntti Määttä2020-08-124-44/+59
| | | | | | | | | | | | | | | | | | The subpresentation layer textures are stored per instance basis so the getter needs to use the correct main presentation layer to get it. Getting the subresentation texture id from images already work by using "subpresentationId:elementPath" in the getter. For subpresentation layers the getter needs to specify also the main presentation layer using the subpresentation. The elementPath needs to be specified as elementPath::subpresentationId:elementPath. F.ex. "Scene.Layer2::subpres:Scene.Layer" Task-number: QT3DS-4127 Change-Id: Ifeb654838e6cc97ac8f95841e080e3c35fc76ad7 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Scale QML stream item size up to nearest divisible-by-four sizeTomi Korpipaa2020-08-123-1/+18
| | | | | | | | Task-number: QT3DS-4144 Change-Id: Id1bd2387538a6cf865c59830730d80eb5f93652f Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Optimize runtime performanceAntti Määttä2020-08-117-66/+61
| | | | | | | | | | | - Reduce allocations by reducing std::pair usage. - Reduce allocations by not caching parents. - Some smaller optimizations Task-number: QT3DS-4151 Change-Id: I0bf770069b23ca4715f5f98ab3b35001156fe8fc Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Fix transparent objects in ordered groupsJere Tuliniemi2020-07-281-1/+0
| | | | | | | | | Transparent objects would always be rendered on top of opaque objects since their depth test was disabled in ordered groups. Task-number: QT3DS-4126 Change-Id: I3ddb1f14c97e4176f8a979a952aba3914e45171f Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>