diff options
Diffstat (limited to 'examples/qt3d')
-rw-r--r-- | examples/qt3d/phong-cubes/main.qml | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/examples/qt3d/phong-cubes/main.qml b/examples/qt3d/phong-cubes/main.qml index 0e067fdad..311e65a63 100644 --- a/examples/qt3d/phong-cubes/main.qml +++ b/examples/qt3d/phong-cubes/main.qml @@ -51,7 +51,8 @@ import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 -import Qt3D.Extras 2.0 +import Qt3D.Extras 2.10 +import QtQuick 2.0 Entity { components: [ @@ -84,19 +85,19 @@ Entity { CubeEntity { position: Qt.vector3d(-1, 1, 0) - material: PhongMaterial {} + material: DiffuseSpecularMaterial {} } CubeEntity { position: Qt.vector3d(0, 1, 0) - material: DiffuseMapMaterial { + material: DiffuseSpecularMaterial { diffuse: TextureLoader { source: "qrc:/assets/textures/pattern_09/diffuse.webp" } } } CubeEntity { position: Qt.vector3d(1, 1, 0) - material: DiffuseSpecularMapMaterial { + material: DiffuseSpecularMaterial { diffuse: TextureLoader { source: "qrc:/assets/textures/pattern_09/diffuse.webp" } specular: TextureLoader { source: "qrc:/assets/textures/pattern_09/specular.webp" } } @@ -104,12 +105,15 @@ Entity { CubeEntity { position: Qt.vector3d(-1, 0, 0) - material: PhongAlphaMaterial {} + material: DiffuseSpecularMaterial { + alphaBlending: true + diffuse: Qt.rgba(0.7, 0.7, 0.7, 0.5) + } } CubeEntity { position: Qt.vector3d(0, 0, 0) - material: NormalDiffuseMapMaterial { + material: DiffuseSpecularMaterial { normal: TextureLoader { source: "qrc:/assets/textures/pattern_09/normal.webp" } diffuse: TextureLoader { source: "qrc:/assets/textures/pattern_09/diffuse.webp" } } @@ -117,7 +121,8 @@ Entity { CubeEntity { position: Qt.vector3d(1, 0, 0) - material: NormalDiffuseMapAlphaMaterial { + material: DiffuseSpecularMaterial { + alphaBlending: true normal: TextureLoader { source: "qrc:/assets/textures/pattern_09/normal.webp" } diffuse: TextureLoader { source: "qrc:/assets/textures/pattern_09/diffuse.webp" } } @@ -125,7 +130,7 @@ Entity { CubeEntity { position: Qt.vector3d(-1, -1, 0) - material: NormalDiffuseSpecularMapMaterial { + material: DiffuseSpecularMaterial { normal: TextureLoader { source: "qrc:/assets/textures/pattern_09/normal.webp" } diffuse: TextureLoader { source: "qrc:/assets/textures/pattern_09/diffuse.webp" } specular: TextureLoader { source: "qrc:/assets/textures/pattern_09/specular.webp" } @@ -134,7 +139,7 @@ Entity { CubeEntity { position: Qt.vector3d(0, -1, 0) - material: NormalDiffuseSpecularMapMaterial { + material: DiffuseSpecularMaterial { normal: TextureLoader { source: "qrc:/assets/textures/pattern_09/normal.webp" } diffuse: TextureLoader { source: "qrc:/assets/textures/pattern_09/diffuse.webp" } specular: TextureLoader { source: "qrc:/assets/textures/pattern_09/specular.webp" } @@ -143,7 +148,7 @@ Entity { CubeEntity { position: Qt.vector3d(1, -1, 0) - material: NormalDiffuseSpecularMapMaterial { + material: DiffuseSpecularMaterial { normal: TextureLoader { source: "qrc:/assets/textures/pattern_09/normal.webp" } diffuse: TextureLoader { source: "qrc:/assets/textures/pattern_09/diffuse.webp" } specular: TextureLoader { source: "qrc:/assets/textures/pattern_09/specular.webp" } |