summaryrefslogtreecommitdiffstats
path: root/src/runtimerender/graphobjects
Commit message (Collapse)AuthorAgeFilesLines
* Fix studio viewport rendering when scene camera is visibleAntti Määttä2020-05-072-3/+3
| | | | | | | | | | 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>
* 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>
* Make attributes referenced for custom materialsJanne Kangas2020-04-071-2/+2
| | | | | | | | | | | | | | 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>
* Add dynamic layer resizingJere Tuliniemi2020-02-284-3/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Implement culling mode for materialsAntti Määttä2020-01-212-0/+12
| | | | | | | | | | -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>
* Add toggle for disabling ambient occlusionJanne Kangas2020-01-152-0/+2
| | | | | | | | 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-132-0/+7
| | | | | | | | | | | 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>
* Add project setting for automatically flipping compressed texturesJanne Kangas2019-12-123-3/+7
| | | | | | | | | | | 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>
* Fix qml subpresentation alpha premultiply settingAntti Määttä2019-12-041-1/+1
| | | | | | Task-number: QT3DS-4017 Change-Id: Ia5888f3c44f2ef2dc981a2a13893a21a28f01f41 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix subpresentation transparent clearAntti Määttä2019-11-291-9/+11
| | | | | | | | | | | | | | 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>
* 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>
* 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>
* Indicate material shader errors in EditorJanne Kangas2019-10-021-0/+13
| | | | | | | | 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>
* Indicate effect shader errors in Editorv2.5.0-beta2Janne Kangas2019-09-302-0/+16
| | | | | | | | | | | | 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 transparency mode selection to standard materialsJere Tuliniemi2019-09-192-0/+11
| | | | | | | | | | | | | | | | | | | | 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>
* Support QQuickImageProvider in the runtimeJere Tuliniemi2019-09-171-0/+3
| | | | | | | | | | | | | | | 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 property to Camera to enable frustum culling when neededAndy Nichols2019-08-292-0/+2
| | | | | | | | | | 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>
* Use reloadable textures with dynamic objectsAntti Määttä2019-08-123-0/+11
| | | | | | | Task-number: QT3DS-3748 Change-Id: I0c5cd712960bd1caedb36828a159e90a52733dd2 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Ignore sourcepath when subpresentation is setKaj Grönholm2019-08-061-1/+3
| | | | | | | | | When UIP image has subpresentation set, don't try to load sourcepath as it contains same subpresentation ID and fails with a warning. Task-number: QT3DS-3723 Change-Id: I8d5a5045a78828e74f7bf7d81c1feecd75900e00 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix progressive antialiasingAntti Määttä2019-06-281-3/+4
| | | | | | | | | | | | | | There were two problems with the antialiasing. The default materials inside container were never cleared dirty. The subpresentation rendering didn't correctly set the dirty flags when the same subpresentation is rendered multiple times. Task-number: QT3DS-1796 Change-Id: Ice1942ec4b919df009c59aa3ffdfc8efd430db1e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
* Long live the slayer!Pasi Keränen2019-06-0733-0/+4224
Initial commit of OpenGL Runtime to repository. Based on SHA1 61823aaccc6510699a54b34a2fe3f7523dab3b4e of qt3dstudio repository. Task-number: QT3DS-3600 Change-Id: Iaeb80237399f0e5656a19ebec9d1ab3a681d8832 Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>