summaryrefslogtreecommitdiffstats
path: root/src/render/lights
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch '5.6' into 5.7Sean Harmer2016-04-164-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qt3d/examples-common/qorbitcontrol.h src/core/qnodecreatedchange.cpp src/core/qnodecreatedchange.h src/input/frontend/qaxisactionhandler.h src/input/frontend/qinputaspect.h src/input/frontend/qkeyboardhandler.h src/input/frontend/qmousedevice.h src/input/frontend/qmousehandler.h src/input/frontend/qphysicaldevicecreatedchange.h src/input/input.pro src/logic/qframeaction.h src/plugins/sceneparsers/assimp/assimp.pro src/quick3d/imports/input/importsinput.pro src/quick3d/imports/render/importsrender.pro src/render/backend/trianglesextractor.cpp src/render/framegraph/qclearbuffer.h src/render/framegraph/qlighting.h src/render/framegraph/qstateset.h src/render/frontend/qrenderattachment.h src/render/geometry/qabstractattribute.h src/render/geometry/qabstractbuffer.h src/render/geometry/qattribute.h src/render/geometry/qboundingvolumespecifier.h src/render/geometry/qbuffer.h src/render/materialsystem/qfilterkey.h src/render/materialsystem/qparameter.h src/render/materialsystem/qparametermapping.h src/render/renderstates/qblendstate.h src/render/renderstates/qdepthmask.h src/render/renderstates/qpointsize.cpp src/render/renderstates/qrenderstatecreatedchange.cpp src/render/renderstates/qstencilop.h src/render/renderstates/qstencilopseparate.h src/render/renderstates/qstenciltestseparate.h src/render/texture/qabstracttexture.h src/render/texture/qabstracttextureimage.h src/render/texture/qtextureproviders.h Change-Id: I894d7781042cabdaa0cac690c198b57a41127bd4
| * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-03-014-7/+7
| | | | | | | | | | | | | | | | ... or equivalent. Task-number: QTBUG-45291 Change-Id: I1453477ad718335ca6c5c0c3447539cb93e21176 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QPointLight property changesRobert Brock2016-04-053-39/+27
| | | | | | | | | | | | | | | | | | | | | | Removed QVector3D attenuation Added constantAttenuation Added linearAttenuation Added quadraticAttenuation Change-Id: I0ee9081493a09ec7133fd47207f41b76d4abd9b5 Task-number: QTBUG-51490 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | RenderLightFunctor handles creationSean Harmer2016-03-312-0/+9
| | | | | | | | | | Change-Id: I36ed76eb78b5e0e008f1be610d605a35a39b7697 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QSpotlight property renamingRobert Brock2016-03-233-23/+101
| | | | | | | | | | | | | | | | | | | | - direction -> localDirection - No longer inherits from QPointLight - added attenuation properties Change-Id: Iaf8ce888ff45184a6c7f021c47b423e092939c38 Task-number: QTBUG-51492 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QDirectionalLight renamed direction to worldDirectionRobert Brock2016-03-083-14/+14
| | | | | | | | | | | | | | As per API review Change-Id: Ida081aa126ec285c090b244b3bf6abf579108feb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Added AbstractRenderer pointer to RenderBackendNodeWieland Hagen2016-02-242-2/+5
| | | | | | | | | | | | | | | | Modified all node functors to pass QRenderAspect's renderer instance to all newly created backend nodes Change-Id: Iffa4941bff53f6acf87f46789219c7ae2f123615 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Dedicated QRenderBackendNodeWieland Hagen2016-02-241-1/+1
| | | | | | | | | | | | | | | | | | Render aspect Backend nodes now subclass from QRenderBackendNode, which is a subclass of QBackendNode. We may want to store aspect- related data in each backend node Change-Id: I4f00de09c8cc31d2347d919151d359ad44cf03a9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QBackendNodeFunctor -> QBackendNodeMapperPaul Lemire2016-02-231-1/+1
| | | | | | | | | | Change-Id: Ie81f98c22a3a5cc97e31671f9455d597a0e20b39 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | const QNodeId & -> QNodeIdPaul Lemire2016-02-222-4/+4
| | | | | | | | | | Change-Id: Ia672918cbae3b950e20e68bfbfd6982676a5981e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Removed factory member variableRobert Brock2016-02-072-3/+2
| | | | | | | | | | | | | | | | | | The variable was removed from QBackendNode and subsequently all areas it appeared. Task-number: QTBUG-49682 Change-Id: I5904714b55aaefbe07ee11008ff49cd1d9b89950 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-264-17/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/doc/src/qt3dcollision-module.qdoc src/render/frontend/qcamera.cpp src/render/frontend/qcameralens.cpp Change-Id: I8a0ae250a6b8e065a1ef3c817968ebb7ef23b20d
| * Doc: Exclude private header files from the documentation buildTopi Reinio2016-01-254-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | In the documentation configuration, exclude all '_p.h' files from the documentation build. This prevents QDoc from generating documentation for private classes, and also allows removal of documentation that explicitly set the private classes \internal. Change-Id: I8fcf5c99a2a0b75e9ee5dcd928fa4a2b4b8cf34f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Fixed some documentation warningsTomi Korpipää2016-01-191-1/+1
| | | | | | | | | | | | | | Change-Id: I5055043641a1916dde47ad614d8ab7a5788fd93b Task-number: QTBUG-46037 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Pasi Keränen <pasi.keranen@theqtcompany.com>
* | Unify license header usageAntti Kokko2016-01-2614-156/+198
|/ | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Add support for spotlightsLaszlo Agocs2015-12-095-10/+11
| | | | | Change-Id: I61a4e072c1a2e00cdbcee917aa557e56fb8cb7c0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Added parameters to signals and made setters Q_SLOTSTomi Korpipää2015-12-098-23/+28
| | | | | | Change-Id: Icec2f9f207221e35ffdeeb594bb9b4dc6ef890f1 Task-number: QTBUG-49797 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Indicate light typeLaszlo Agocs2015-12-076-8/+41
| | | | | | | | | | | | Having a dedicated type field is required not just to make the shaders cleaner but also to avoid incorrect results when lights get moved around in the scene. Currently the shaders rely on the direction uniform to distinguish directional lights from the others, but this cannot work when the elements in the lights uniform array change, potentially leaving type-specific members like direction set when a point light takes the same index. Change-Id: I170e4b471c8cd9b4a23eca49690239c01944b3e6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add a default value for direction in QDirectionalLightLaszlo Agocs2015-12-041-0/+1
| | | | | | | | Otherwise adding DirectionalLight { } will behave as a point light which is not what we want. Change-Id: I726174c9b580a141d0d7e0d95b32d5dafb93781a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add attenuation factors for point lightsLaszlo Agocs2015-11-273-0/+79
| | | | | | | | | For decent results the distance and the attenuation factors will have to be taken into account. Task-number: QTBUG-44875 Change-Id: Idc1b1d063802ea350a6da6509bf967e898712f4d Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Lights phase 1: infrastructureLaszlo Agocs2015-11-2615-114/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractLight becomes QLight and gets its own backend node. This way we can easily gather all lights for the scene and filter them when building render commands. Both the frontend and backend remain a subclass of (Q)ShaderData but will not be part of the ordinary ShaderData component list. This prevents mixing up ShaderDatas and Lights but allows reusing the same underlying infrastructure so that properties can automatically be transformed for example. It is worth noting that the position property for lights is now removed: the position is determined by the entity's (to which the light component belongs) position. A number of changes are made to ShaderData itself as backend subclassing with different managers is not straightforward. For now the distance between the rendered entity and the entity with the light component is calculated and lights will be chosen based on this distance. A framegraph node for controlling this will be added in future patches. No uniform setting or shader changes are included here. Task-number: QTBUG-48834 Change-Id: I43a6c5f9420d4254d798c558bd58680b2b09eceb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Fix QDoc warnings and do further cleanupTopi Reinio2015-11-234-16/+16
| | | | | | | | | Fix the documentation issues that still remained broken after renaming the namespaces/QML modules. Do further cleanup and minor doc editing. Change-Id: Iff38c8c1b99e7f712dc3f9ad07ecd37a747b3a26 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Doc: Documentation clean upVenugopal Shivashankar2015-11-061-2/+3
| | | | | | | | | | - Changed 'Qt3D' references to 'Qt 3D'. - Fixed incorrect \inqmlmodule instances. - Fixed broken \printuntil instances in the example docs. - Updated the namespace qualifier for a few class references. Change-Id: I250afe6843b10ed520f9ce5d7465203cc5c212c1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Qt3DRender::QSpotLightPrivate: Remove unnecessary exportAndy Nichols2015-10-301-1/+1
| | | | | Change-Id: I3ce754dfc713b328e047e8fecb284f1adff68e0e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DRender::QPointLightPrivate: Remove unnecessary exportAndy Nichols2015-10-301-1/+1
| | | | | Change-Id: I5bae19b9e03b48a2747fbe1145ecd0bed7ed55d3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DRender::QDirectionalLightPrivate: Remove unnecessary exportAndy Nichols2015-10-301-1/+1
| | | | | Change-Id: I3745428faf1b7bce3b02b23d91f663ed96d788c5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Qt3DRender::QAbstractLightPrivate: Remove unnecessary exportAndy Nichols2015-10-301-2/+1
| | | | | Change-Id: Ie7817051d22677a3459aa3b15b882b5d1c400d1a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Updated the docs for the namespace changesVenugopal Shivashankar2015-10-274-7/+7
| | | | | | | | | | | | | | | | Each of the submodules now have there own namespace so the following changes are required to adapt: - Added \namespace docs for the new namespaces. - Updated all the \class and \instantiates entries to use the appropriate namespace qualifier. - Changed the \module and \qmlmodule names for Qt 3D Core and Qt 3D Render modules. - Added the missing \module and \qmlmodule pages for the Qt 3D Collision module. Change-Id: Ibc5bf30e4f50aecb6a3b24bc8536f17ed19d681d Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Rename Renderer -> Render throughoutSean Harmer2015-10-198-14/+14
| | | | | | | | This is for consistency between the C++ namespaces and QML imports and with the other aspects. Change-Id: I73392f138b4e519b12888f52530123e3d0ba445e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move Qt3DCore into Qt3DCore namespaceSean Harmer2015-10-137-24/+24
| | | | | | | Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add "We mean it" warnings to private headersSean Harmer2015-10-134-0/+44
| | | | | Change-Id: Ic4a69123255c33990765ea3601e01914c2d8cb70 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move lights into their own directorySean Harmer2015-10-1313-0/+1120
Change-Id: I4caecd5072dfc2c0ad11ec2a76f1e6be44d3ce8f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>