summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/lights/main.qml
Commit message (Collapse)AuthorAgeFilesLines
* Add replacement materials examplev5.11.0-beta3Sean Harmer2018-04-041-2/+9
| | | | | | | | | | | | | | All texture assets were made by KDAB under the CLA. The material "sphere" mesh is from Allegorithmic and published under the Creative Commons 4 license. See paragraph 1.2 of https://www.allegorithmic.com/legal/substance-share Task-number: QTBUG-61415 Change-Id: I23d61723bbac561e22e11fa57105b29148c01699 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 74c06c02f896c6aba408cfd0857d317378572736)
* Resurect ForwardRenderer.qml in an exampleKevin Ottens2017-01-271-1/+1
| | | | | | | | | Could be useful to have it around in an example still, so that people get an idea on how to make their own framegraph in QML from scratch. Some other examples have QML framegraphs too, but this one is simpler. Change-Id: I9065af920b1233d3f06cfee71c59afe98359cb7e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Consolidate QML/C++ materials in extrasKevin Ottens2017-01-271-2/+2
| | | | | | | | | | | We remove the qml implementation of materials in extras that were also implemented in C++. Note this is an API change for the materials having texture properties. The QML ones had mistakenly a string property instead of a texture one. This move also fixes this API issue on the QML end. Change-Id: Ibed14288cd7b8c5ab9615b74b949c6a73ac29329 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Lights: Fix animation in example and add anotherSean Harmer2016-07-121-6/+15
| | | | | | | | | | | | | Looks like QML doesn't like animating only a single element of a 3d vector. It seems to default the non-animating elements to 0. Instead use a Vector3DAnimation. Also added another animation to the transformation to make the spotlight move back and forth in addition to sweeping it's local direction angle. Change-Id: Ief490752107b2b618dcf8500cb87561b3baea0bb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Lights: Use PhongMaterial now default material is goneSean Harmer2016-07-121-3/+9
| | | | | Change-Id: I51d8068d9f910981db89fc26e4bd29b928faad56 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Large scene, so higher top speed with accelerationKevin Ottens2016-05-121-1/+6
| | | | | Change-Id: I6a350c5604e1503509b3f92d831f41e4ad7d62e2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Activate input handlingKevin Ottens2016-04-281-6/+10
| | | | | Change-Id: I5d195a0a1b988dbd9a87340645ada814bc3872fd Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix attenuation use in SpotLightKevin Ottens2016-04-281-1/+1
| | | | | Change-Id: Iac7b2389556edd9ccecb309ff6fb1f6cdce5a66b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move defaults and geometries out of Qt3DRender and into Qt3DExtrasPaul Lemire2016-04-231-0/+1
| | | | | | | QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Follow QSpotlight API changes.Volker Krause2016-03-291-2/+2
| | | | | Change-Id: I1b52c7c2f437a63738ae506e429e649e57768531 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Some fixes for examples.Wieland Hagen2016-03-091-1/+1
| | | | | | | | Mostly insertion of RenderSurfaceSelector, FrameGraph->RendererSettings, remove parameter bindings Change-Id: I182092d43b0842da07e995387c0fe174d45345df Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QDirectionalLight renamed direction to worldDirectionRobert Brock2016-03-081-1/+1
| | | | | | | As per API review Change-Id: Ida081aa126ec285c090b244b3bf6abf579108feb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Unify license header usage.Antti Kokko2016-01-261-19/+33
| | | | | | | | Updated license headers to use new BSD header instead of LGPL3 one (in those files which will be under BSD) Change-Id: I300c5840db3fd4708d5d85e84f7c6729cba326e5 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Have Qt3DQuickWindow manage window surfaceSean Harmer2016-01-181-1/+0
| | | | | Change-Id: I3d034728781aa5b99868c92ea73ebf427ee88c5a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Temporarily expose window to QML contextSean Harmer2016-01-181-0/+1
| | | | | | | | | Allows to restore most of the QML examples using this approach until a more permanent solution can be developed (I have an idea on how to do this and will try it today). Change-Id: I9b9bb86a5323140be3ed2456cdfa91b1f93187b1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Link examples against static libPaul Lemire2016-01-161-3/+1
| | | | | | | | | | | | | Contains: Qt3DWindow Qt3DQuickWindow QFirstPersonCameraController FirstPersonCameraController.qml This will allow to get rid of the Camera configuration hack Change-Id: I55c5634aa4c162f9dd2852d3258073a6352b426c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Reduce specular reflectivity defaultsLaszlo Agocs2015-12-101-0/+1
| | | | | | | | 0.95 -> 0.01 to prevent eye-poppingly white specular highlights. Change-Id: I3e765bad13afe991053932e73cea13b95c950c1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Do lighting calculation in world spaceLaszlo Agocs2015-12-101-1/+4
| | | | | | | | | | | | | | | | As opposed to (mostly) camera space. Oops. While somewhat hidden with point lights, the problem became apparent with directional lights. Now that we have proper directional lights, change the default light, that is used when no light components are specified at all, from point to directional since this is cheaper and provides less surprises with arbitrary scenes. Also remove the duplicate phongalpha vertex shader in the process. Change-Id: I295660a1400b16b69e1516672e31794312ee48d1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for spotlightsLaszlo Agocs2015-12-091-3/+42
| | | | | Change-Id: I61a4e072c1a2e00cdbcee917aa557e56fb8cb7c0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add a directional light to the exampleLaszlo Agocs2015-12-071-0/+13
| | | | | Change-Id: Iecf4d0fcb42e41e486d8cd6bf943c09878c7bbb2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Enhance lights exampleLaszlo Agocs2015-11-301-3/+23
| | | | | | | | Two animated lights with the position of the lights represented as spheres. Change-Id: I5e337a4c2932e75dc4d676d4d9b9349249f6b227 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Lights phase 1: infrastructureLaszlo Agocs2015-11-261-0/+91
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>