summaryrefslogtreecommitdiffstats
path: root/src/render/lights
Commit message (Collapse)AuthorAgeFilesLines
* Switch to std::vector in QRenderAspect backend and OpenGL rendererPaul Lemire2020-06-302-5/+5
| | | | | Change-Id: I91dd69fc205401b12f333a9a0534d9612c8e24f8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Merge remote-tracking branch 'origin/5.15' into devMike Krus2020-04-271-0/+5
|\ | | | | | | Change-Id: Id669d5c1aab29965eac0dabd1cb497e908dac23e
| * Implement MetalRough shader optimization TODOMichael Brasser2020-03-271-0/+5
| | | | | | | | | | | | | | Calculate specularMipLevels only once, on the CPU. Change-Id: I694e3d5e45ea369875ac3ecff36f885b3f669bcf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Remove unused data structuresMike Krus2020-02-112-10/+0
| | | | | | | | | | | | | | Was used by old node init API Change-Id: I7b68f25634ee7aaccefab6f499ac074fcfb9a7f4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Remove deprecated classes and functionsPaul Lemire2020-02-116-22/+3
|/ | | | | | | Mostly old messaging API Change-Id: I17eb2206b2ede56d2f7d36375d5e711d6149019f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make the OpenGL renderer a pluginPaul Lemire2020-02-053-4/+4
| | | | | | | | By default the QRenderAspect will try to load this plugin Change-Id: Ie55e207fb8e6d0b64f717bbb99699eb669eaa3f2 Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Doc: Add note about implementation specific property meaningPaul Wicking2019-12-104-18/+84
| | | | | | Fixes: QTBUG-73095 Change-Id: I843b0376ed0e4ece6ef949acb596a0303aac977d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Clean up includesMike Krus2019-10-013-3/+0
| | | | | | | | | Remove include statements for classes that are no longer used. Makes it easier to find remaining use cases that need addressed before complete removal in Qt 6. Change-Id: I60529ba1929ad64b162d3847d5df47cde2a60dad Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update QAbstractLight to use direct syncMike Krus2019-09-182-8/+12
| | | | | Change-Id: I5efde51f6cadd5e4b6faa28e8b97e2cf2e14706f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Update QEnvironmentLight to use direct syncMike Krus2019-09-182-6/+11
| | | | | Change-Id: I4f89fa7609ef84a9e2795dc81e8232c895177e9f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-241-3/+31
|\ | | | | | | Change-Id: I7d7274866129a3c8a3ed3788680a46368120d20d
| * Expand EnvironmentLight documentationMichael Brasser2019-08-201-3/+31
| | | | | | | | | | Change-Id: Ia6e6ca65469c7c04914fbb6a73f796ec86436577 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-304-0/+63
|\| | | | | | | Change-Id: Id2885cdbb45f8aa701e218b6201f0a3732b7ef11
| * Provide more detail in *Light documentationMichael Brasser2019-07-234-0/+63
| | | | | | | | | | Change-Id: I8d56836f1f075c7239b262454131062c10058026 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-271-1/+24
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iae5fa92dfdf8012315c043e20950368e42451e20
| * Doc: Extend Qt3D documentationPaul Wicking2019-06-071-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds missing C++ and/or QML documentation for: * enum QBuffer::AccessType * QBuffer::accessType() * QBuffer::dataAvailable() * ForwardRenderer::externalRenderTargetSize * enumeration Qt3D.Render.Light::type * Qt3D.Render.Light::color * Qt3D.Render.Light::intensity Fixes: QTBUG-73071 Change-Id: I48b13cb8001558b20bd801b6f96f5b5933144d82 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* | Merge remote-tracking branch 5.12 into 5.13Paul Lemire2019-04-261-0/+5
|\| | | | | | | Change-Id: I42affdd02bddb5205b9f2455f0c5e5efbd414dd8
| * Cache light/renderable/computable vectorsJames Turner2019-04-101-0/+5
| | | | | | | | | | | | | | | | This avoids running these jobs when lights / renderables have not changed in a frame Change-Id: I604180fe3442ab67648c4ba5d9effb8639c68ef7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Switch export macros to standard formKai Koehne2019-04-0210-10/+10
|/ | | | | | | | | | | | Qt expects the export macros to have Q_ prefixes, otherwise the symbol versioning script won't find them and mark them. Also remove non-exising QT3DLOGIC_PRIVATE_EXPORT macro from src/doc/qt3d.qdocconf Task-number: QTBUG-74752 Change-Id: I71b9e85ff09c002fb283824aa51a5a8f50e937f4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QEnvironmentLight: add uniforms for envmaps sizePaul Lemire2018-12-203-6/+49
| | | | | | | | | This makes future ES2 PBR implementation possible as textureSize() is not available on ES2 Change-Id: Ibf2b36240778a3f30f4316a67819f9052e46bdf1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* QEnvironmentLight: fix wrong getter callPaul Lemire2018-12-191-1/+1
| | | | | | | | Which resulted in incorrect specular texture bookkeeping. Change-Id: Iceed7e44e791f373f04c35f1a46f5c9ba97d012d Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Doc: Fix documentation warnings for Qt 3D RenderTopi Reinio2018-02-281-6/+0
| | | | | | | | | | | | | This change fixes multiple QDoc warnings for Qt 3D Render that are related to how Clang parses the source code and the \fn QDoc commands. A number of changes are related to preventing documentation for private classes from generating warnings. We still have a number of 'No documentation for ...' warnings left - those are not addressed in this change. Change-Id: Ic92a729496a81e7869060811ed7dd23408cff833 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge branch '5.10' into devSean Harmer2018-01-171-2/+2
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I248aa369ba98659a61e563fd29cc811c76ea1e2d
| * Merge branch '5.9' into 5.10Sean Harmer2018-01-121-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/animation/backend/handle_types_p.h src/extras/defaults/qtexturematerial.h src/render/backend/entity_p.h src/render/backend/handle_types_p.h src/render/backend/renderview.cpp src/render/io/scenemanager.cpp Change-Id: Ic145062cc98360e9067fd60f0992c7a6b51e41bb
| | * Fix includes of Qt classesFriedemann Kleint2017-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The convention <QtModule/QClass> should be used. Among other things, this makes generating Python bindings possible. Task-number: PYSIDE-487 Change-Id: I32f114377dd70d27dee71a44b05c81474eb5dac3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Replace Q_DECL_FINAL with finalKevin Funk2017-09-252-4/+4
| | | | | | | | | | | | | | | Change-Id: Ia80d1cb9cc96d76f8b367caa725c59a70ae0a4d5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-253-3/+3
|/ / | | | | | | | | Change-Id: I92c955068e233c50043ad7d06a32300dd386c24d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-09-012-11/+20
|\| | | | | | | Change-Id: Ic4220f9957266c374f751d3612c60b81e9cea193
| * Doc: add doc to undocumented methods qt3dNico Vertriest2017-08-292-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qabstractlight.h:65: warning: No documentation for 'Qt3DRender::QAbstractLight::Type' qspotlight.h:64: warning: No documentation for 'Qt3DRender::QSpotLight::attenuation()' qshaderprogram.h:78: warning: No documentation for 'Qt3DRender::QShaderProgram::Status' qshaderprogram.h:121: warning: No documentation for 'Qt3DRender::QShaderProgram::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &change)' qpicktriangleevent.h:57: warning: No documentation for 'Qt3DRender::QPickTriangleEvent::uvw' Change-Id: Iedb73cc73bc28a5e9dd3498a0bb6547eb1a96ffc Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | This method has no implementationKevin Ottens2017-07-171-1/+0
|/ | | | | | Change-Id: I017d83acc576aaad921f62b2ae0e858660f15259 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add missing private export macrosMike Krus2017-06-165-5/+10
| | | | | | | | Was found when Nathan tried extending QCamera. Probably good to go through other parts of Qt3D. Change-Id: I317acaa36ffe3fd0b1ac0bbf4af70eabb1111ab7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QEnvironmentLight into Qt3DRenderKevin Ottens2017-02-246-0/+512
| | | | | | | | | | This is a better API to set the environment lighting than what we currently have on the metal/rough materials. Still needs to be integrated in the renderer and to adjust the materials to make use of it. Change-Id: Ie1e46a0fa67916460147200c9cbbfbab8b037cee Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* LCOV exclusion comments squashedPaul Lemire2016-11-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a combination of 60 commits. qlockableobserverinterface_p.h: add LCOV exclusion comments qobserverinterface_p.h: add LCOV exclusion comments qpostman_p.h: add LCOV exclusion comments qsceneobserverinterface_p.h: add LCOV exclusion comments qscene_p.h: add LCOV exclusion comments qnodeid.h: add LCOV exclusion comments quick3dshaderdataarray_p.h: add LCOV exclusion comments quick3dshaderdata_p.h: add LCOV exclusion comments qquaternionanimation_p.h: add LCOV exclusion comments qabstractphysicaldeviceproxy_p.h: add LCOV exclusion comments qmouseevent.h: add LCOV exclusion comments qmousedevice.h: add LCOV exclusion comments qaxisaccumulator.h: add LCOV exclusion comments qtextureimagedatagenerator.h: add LCOV exclusion comments qtexturewrapmode.h: add LCOV exclusion comments qabstracttexture.h: add LCOV exclusion comments qtextureimage.h: add LCOV exclusion comments texture_p.h: add LCOV exclusion comments qtexturegenerator.h: add LCOV exclusion comments qsortpolicy.h: add LCOV exclusion comments qrendertargetselector.h: add LCOV exclusion comments qsortcriterion.h: add LCOV exclusion comments qclearbuffers.h: add LCOV exclusion comments qrendercapture_p.h: add LCOV exclusion comments uniform_p.h: add LCOV exclusion comments triangleboundingvolume_p.h: add LCOV exclusion comments qgeometryfactory.h: add LCOV exclusion comments qbuffer_p.h: add LCOV exclusion comments qbuffer.h: add LCOV exclusion comments qgeometryrenderer.h: add LCOV exclusion comments qbufferdatagenerator.h: add LCOV exclusion comments qattribute.h: add LCOV exclusion comments qsceneiohandler_p.h: add LCOV exclusion comments qsceneloader.h: add LCOV exclusion comments qrendersettings.h: add LCOV exclusion comments qcamera.h: add LCOV exclusion comments qcameralens.h: add LCOV exclusion comments sphere_p.h: add LCOV exclusion comments shaderdata_p.h: add LCOV exclusion comments qshaderdata.h: add LCOV exclusion comments qgraphicsapifilter.h: add LCOV exclusion comments qshaderprogram.h: add LCOV exclusion comments qpointsize.h: add LCOV exclusion comments qblendequation.h: add LCOV exclusion comments qstenciltestarguments.h: add LCOV exclusion comments qalphatest.h: add LCOV exclusion comments qstenciloperationarguments.h: add LCOV exclusion comments qdepthtest.h: add LCOV exclusion comments qblendequationarguments.h: add LCOV exclusion comments qfrontface.h: add LCOV exclusion comments qcullface.h: add LCOV exclusion comments qray3d_p.h: add LCOV exclusion comments qboundingvolume_p.h: add LCOV exclusion comments qabstractcollisionqueryservice_p.h: add LCOV exclusion comments qpickevent.h: add LCOV exclusion comments qabstractlight.h: add LCOV exclusion comments light_p.h: add LCOV exclusion comments qt3dquickwindow.h: add LCOV exclusion comments scene3ditem_p.h: add LCOV exclusion comments qgraphicsapifilter_p.h: add LCOV exclusion comments Change-Id: I3af0e2a4d85685c919dbfaa8b3f384777f026542 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Save per-fragment normalization by doing it CPU side once when setSean Harmer2016-07-121-2/+3
| | | | | | | | | The spot light local direction was being normalized in the fragment shader which is a lot of work. Much better to normalize it once on the CPU side when it is updated. Change-Id: I87045462b6b09fad4262f5755493b87595d29f11 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move LightSource to dedicated filePaul Lemire2016-07-033-2/+149
| | | | | Change-Id: I62751e0f8460ab4680a7bd80eda0cc2a8011b1ef Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix QSpotLight direction handlingKevin Ottens2016-07-021-0/+2
| | | | | | | | This is a local direction, so it needs to be marked to be transformed into a world direction on the backend side. Change-Id: I204608fb3b3b8bd30ae3687fdb53d4d4c7270219 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Skeletal Doc for render-lightsColin Ogilvie2016-05-284-10/+111
| | | | | | Task-number: QTBUG-46037 Change-Id: I045b7ff77827de2410fc785c16508ff1429f14fb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Initialize dynamic properties of lightsSean Harmer2016-05-251-0/+2
| | | | | | | | | | | | Forces them to be initialized so they exist when the property reader is used for later updates. Also use correct type in default value setting of uniforms. Task-number: QTBUG-53585 Change-Id: Id594670ea75385c1d54f06d4d7c6241d77403ce6 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Default constant of attenuation to 1.0Sean Harmer2016-05-252-2/+2
| | | | | | | | | | | Without this, the default was 0 for the constant attenuation factor. This is bad because if the user only sets the linear and/or quadratic constants, then when the distance gets small, the denominator in the lighting equation gets very large causing a lot of saturation of the renderered meshes. Change-Id: Ie1b8b2d24702090879cb1429912eb51aeb002f68 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* De-inline some more dtors of non-leaf Private classesMarc Mutz2016-05-192-0/+5
| | | | | Change-Id: I2d80f964c4de6ef6cef144ca50fa12ffb3eb540c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* De-inline dtors of public polymorphic classesMarc Mutz2016-05-198-1/+25
| | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. It also allows to add code to them later, if necessary. Change-Id: I0da301cd788162abba6cdbbb21910090a22adb9a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add more explicitMarc Mutz2016-05-144-6/+5
| | | | | | Change-Id: Iaa91d6248cbc3822ed3380e360d2880d4894446d Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNodePropertyChange -> QPropertyUpdatedChangeSean Harmer2016-05-103-3/+3
| | | | | | Task-number: QTBUG-51494 Change-Id: Ic326499f80b5a91b2d19c09770de926f220cc805 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove QBackendNode::updateFromPeer()Sean Harmer2016-05-032-10/+0
| | | | | | | | | | Implemented a few missing initializeFromPeer() implementations along with the corresponding frontend node creation change creation functions. Adapted unit tests. Change-Id: I571e53a7b68a5544bd0e308df0baf7e52533306e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove virtual QBackendNode *create(QNode *frontend) constSean Harmer2016-05-012-9/+0
| | | | | | | | from QBackendNodeMapper and subclasses. No longer needed now we have disabled cloning. Change-Id: I261fa7bccfa9a4019d479079e2ff7c19154e5e72 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Q_NULLPTR -> nullptrSean Harmer2016-05-015-7/+7
| | | | | | Task-number: QTBUG-52736 Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Strip out cloning subsystemSean Harmer2016-04-297-29/+1
| | | | | Change-Id: I4def54a11de0f9c676ef6b2d7bd8e723ded25ab9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix direction for directional and spot lightsKevin Ottens2016-04-282-6/+6
| | | | | | | | | On the shader side this is always named "direction" whatever the name of the property on the frontend object. Change-Id: I01bb8c34c687727eb018d4ce90bcadf00d9707fa Task-number: QTBUG-52710 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractLight now inherits directly QComponentKevin Ottens2016-04-2811-90/+113
| | | | | | | | | | | | | We are turning the relationship between QAbstractLight and QShaderData from a "is-a" to a "has-a". For that we relay all the properties of the light to its internal shader data dynamic properties. Interestingly it also removes a couple of special handling for lights which aren't needed anymore. Change-Id: Ia937b8934f94ce318e02901d90ac340e172cbc75 Task-number: QTBUG-51489 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Whitespace fixKevin Ottens2016-04-281-1/+1
| | | | | Change-Id: Ib560ebc982e763413d16afa9c61aa036dcfc695e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>