diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-08-19 08:42:54 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-08-26 05:59:44 +0000 |
commit | 918970f5f0283ebff7c0a33f4d87f88283fdbb3e (patch) | |
tree | 806e37f31d10bb4eb25cf538f558f94388630c1f /src/quick3d | |
parent | ca85c459cdff08a04d3d6420ea7d00c3d1eaeea7 (diff) |
QSkyboxEntity: remove camera translation property
If we convert a mat4 matrix to a mat3 matrix, then back to a mat4, this
removes the translation component from it. Making the skybox shaders use that
property allows to remove references to the camera translation in
QSkyboxEntity.
This makes using a skybox neater as we don't need to care about the Camera
position anymore. This also allows to render the same skybox with different
cameras which required to have duplicate QSkyboxEntity previously.
Change-Id: I1adddd17d151e4d26d0f19b048df88dbf738042b
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Diffstat (limited to 'src/quick3d')
-rw-r--r-- | src/quick3d/imports/extras/defaults/qml/SkyboxEntity.qml | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/quick3d/imports/extras/defaults/qml/SkyboxEntity.qml b/src/quick3d/imports/extras/defaults/qml/SkyboxEntity.qml index 9fcf8559f..45cef47b7 100644 --- a/src/quick3d/imports/extras/defaults/qml/SkyboxEntity.qml +++ b/src/quick3d/imports/extras/defaults/qml/SkyboxEntity.qml @@ -42,8 +42,6 @@ import Qt3D.Render 2.0 import Qt3D.Extras 2.0 Entity { - - property alias cameraPosition: transform.translation; property string baseName: ""; property string extension: ".png" @@ -82,10 +80,6 @@ Entity { xyMeshResolution: Qt.size(2, 2) } - Transform { - id: transform - } - Material { id: skyboxMaterial parameters: Parameter { name: "skyboxTexture"; value: skyboxTexture} @@ -152,6 +146,6 @@ Entity { } } - components: [cuboidMesh, skyboxMaterial, transform] + components: [cuboidMesh, skyboxMaterial] } |