summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2021-04-23 09:46:41 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-23 10:11:43 +0000
commitd7977923d8d1fb7fa4cab43466f6e1d6d648d333 (patch)
treefde02b634238b65eaa05d1a1ec6ffd75c844c8c3 /examples
parenta080d05e6a46af2c2644b1f1e050dc1daabc0bd9 (diff)
pbr-material example: add qrc:/ prefix resource for assets
So that assets are properly picked up by Qt 6 Change-Id: I78eb79f0c4f5a2e124d57692d4af2947e743bd33 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 3dbfb4f73f0ade4d9bee5a243aa94c412b0ed73d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/qt3d/pbr-materials/TrefoilKnot.qml2
-rw-r--r--examples/qt3d/pbr-materials/main.qml68
2 files changed, 35 insertions, 35 deletions
diff --git a/examples/qt3d/pbr-materials/TrefoilKnot.qml b/examples/qt3d/pbr-materials/TrefoilKnot.qml
index 1a7b4031b..7867ebcbe 100644
--- a/examples/qt3d/pbr-materials/TrefoilKnot.qml
+++ b/examples/qt3d/pbr-materials/TrefoilKnot.qml
@@ -81,6 +81,6 @@ Entity {
Mesh {
id: mesh
- source: "assets/obj/trefoil.obj"
+ source: "qrc:/assets/obj/trefoil.obj"
}
}
diff --git a/examples/qt3d/pbr-materials/main.qml b/examples/qt3d/pbr-materials/main.qml
index 0b69b5659..1fcb24696 100644
--- a/examples/qt3d/pbr-materials/main.qml
+++ b/examples/qt3d/pbr-materials/main.qml
@@ -91,7 +91,7 @@ Entity {
enabled: parent.enabled
irradiance: TextureLoader {
- source: "assets/cubemaps/default/default_irradiance.dds"
+ source: "qrc:/assets/cubemaps/default/default_irradiance.dds"
wrapMode {
x: WrapMode.ClampToEdge
y: WrapMode.ClampToEdge
@@ -99,7 +99,7 @@ Entity {
generateMipMaps: false
}
specular: TextureLoader {
- source: "assets/cubemaps/default/default_specular.dds"
+ source: "qrc:/assets/cubemaps/default/default_specular.dds"
wrapMode {
x: WrapMode.ClampToEdge
y: WrapMode.ClampToEdge
@@ -115,18 +115,18 @@ Entity {
components: [
Mesh {
- source: "assets/obj/plane-10x10.obj"
+ source: "qrc:/assets/obj/plane-10x10.obj"
},
MetalRoughMaterial {
baseColor: TextureLoader {
- source: "assets/textures/ceramic_small_diamond/ceramic_small_diamond_basecolor.png"
+ source: "qrc:/assets/textures/ceramic_small_diamond/ceramic_small_diamond_basecolor.png"
format: Texture.SRGB8_Alpha8
generateMipMaps: true
}
- metalness: TextureLoader { source: "assets/textures/ceramic_small_diamond/ceramic_small_diamond_metallic.png"; generateMipMaps: true }
- roughness: TextureLoader { source: "assets/textures/ceramic_small_diamond/ceramic_small_diamond_roughness.png"; generateMipMaps: true }
- normal: TextureLoader { source: "assets/textures/ceramic_small_diamond/ceramic_small_diamond_normal.png"; generateMipMaps: true }
- ambientOcclusion: TextureLoader { source: "assets/textures/ceramic_small_diamond/ceramic_small_diamond_ambient_occlusion.png" }
+ metalness: TextureLoader { source: "qrc:/assets/textures/ceramic_small_diamond/ceramic_small_diamond_metallic.png"; generateMipMaps: true }
+ roughness: TextureLoader { source: "qrc:/assets/textures/ceramic_small_diamond/ceramic_small_diamond_roughness.png"; generateMipMaps: true }
+ normal: TextureLoader { source: "qrc:/assets/textures/ceramic_small_diamond/ceramic_small_diamond_normal.png"; generateMipMaps: true }
+ ambientOcclusion: TextureLoader { source: "qrc:/assets/textures/ceramic_small_diamond/ceramic_small_diamond_ambient_occlusion.png" }
}
]
}
@@ -159,7 +159,7 @@ Entity {
Mesh {
id: matSphere
- source: "assets/obj/material-sphere.obj"
+ source: "qrc:/assets/obj/material-sphere.obj"
}
Entity {
@@ -180,14 +180,14 @@ Entity {
MetalRoughMaterial {
id: matSphere1Material
baseColor: TextureLoader {
- source: "assets/textures/aluminium_random_brushed/aluminium_random_brushed_basecolor.png"
+ source: "qrc:/assets/textures/aluminium_random_brushed/aluminium_random_brushed_basecolor.png"
format: Texture.SRGB8_Alpha8
generateMipMaps: true
}
- metalness: TextureLoader { source: "assets/textures/aluminium_random_brushed/aluminium_random_brushed_metallic.png"; generateMipMaps: true }
- roughness: TextureLoader { source: "assets/textures/aluminium_random_brushed/aluminium_random_brushed_roughness.png"; generateMipMaps: true}
- normal: TextureLoader { source: "assets/textures/aluminium_random_brushed/aluminium_random_brushed_normal.png"; generateMipMaps: true }
- ambientOcclusion: TextureLoader { source: "assets/textures/no-ao.png" }
+ metalness: TextureLoader { source: "qrc:/assets/textures/aluminium_random_brushed/aluminium_random_brushed_metallic.png"; generateMipMaps: true }
+ roughness: TextureLoader { source: "qrc:/assets/textures/aluminium_random_brushed/aluminium_random_brushed_roughness.png"; generateMipMaps: true}
+ normal: TextureLoader { source: "qrc:/assets/textures/aluminium_random_brushed/aluminium_random_brushed_normal.png"; generateMipMaps: true }
+ ambientOcclusion: TextureLoader { source: "qrc:/assets/textures/no-ao.png" }
}
}
@@ -209,14 +209,14 @@ Entity {
MetalRoughMaterial {
id: matSphere2Material
baseColor: TextureLoader {
- source: "assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_basecolor.png"
+ source: "qrc:/assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_basecolor.png"
format: Texture.SRGB8_Alpha8
generateMipMaps: true
}
- metalness: TextureLoader { source: "assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_metallic.png"; generateMipMaps: true }
- roughness: TextureLoader { source: "assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_roughness.png"; generateMipMaps: true }
- normal: TextureLoader { source: "assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_normal.png"; generateMipMaps: true }
- ambientOcclusion: TextureLoader { source: "assets/textures/no-ao.png" }
+ metalness: TextureLoader { source: "qrc:/assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_metallic.png"; generateMipMaps: true }
+ roughness: TextureLoader { source: "qrc:/assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_roughness.png"; generateMipMaps: true }
+ normal: TextureLoader { source: "qrc:/assets/textures/american_walnut_crown_cut/american_walnut_crown_cut_normal.png"; generateMipMaps: true }
+ ambientOcclusion: TextureLoader { source: "qrc:/assets/textures/no-ao.png" }
}
}
@@ -238,14 +238,14 @@ Entity {
MetalRoughMaterial {
id: matSphere3Material
baseColor: TextureLoader {
- source: "assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_basecolor.png"
+ source: "qrc:/assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_basecolor.png"
format: Texture.SRGB8_Alpha8
generateMipMaps: true
}
- metalness: TextureLoader { source: "assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_metallic.png"; generateMipMaps: true }
- roughness: TextureLoader { source: "assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_roughness.png"; generateMipMaps: true }
- normal: TextureLoader { source: "assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_normal.png"; generateMipMaps: true }
- ambientOcclusion: TextureLoader { source: "assets/textures/no-ao.png" }
+ metalness: TextureLoader { source: "qrc:/assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_metallic.png"; generateMipMaps: true }
+ roughness: TextureLoader { source: "qrc:/assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_roughness.png"; generateMipMaps: true }
+ normal: TextureLoader { source: "qrc:/assets/textures/ceramic_tiles_brown_tomato/ceramic_tiles_brown_tomato_normal.png"; generateMipMaps: true }
+ ambientOcclusion: TextureLoader { source: "qrc:/assets/textures/no-ao.png" }
}
}
@@ -267,14 +267,14 @@ Entity {
MetalRoughMaterial {
id: matSphere4Material
baseColor: TextureLoader {
- source: "assets/textures/copper_brushed/copper_brushed_basecolor.png"
+ source: "qrc:/assets/textures/copper_brushed/copper_brushed_basecolor.png"
format: Texture.SRGB8_Alpha8
generateMipMaps: true
}
- metalness: TextureLoader { source: "assets/textures/copper_brushed/copper_brushed_metallic.png"; generateMipMaps: true }
- roughness: TextureLoader { source: "assets/textures/copper_brushed/copper_brushed_roughness.png"; generateMipMaps: true }
- normal: TextureLoader { source: "assets/textures/copper_brushed/copper_brushed_normal.png"; generateMipMaps: true }
- ambientOcclusion: TextureLoader { source: "assets/textures/no-ao.png" }
+ metalness: TextureLoader { source: "qrc:/assets/textures/copper_brushed/copper_brushed_metallic.png"; generateMipMaps: true }
+ roughness: TextureLoader { source: "qrc:/assets/textures/copper_brushed/copper_brushed_roughness.png"; generateMipMaps: true }
+ normal: TextureLoader { source: "qrc:/assets/textures/copper_brushed/copper_brushed_normal.png"; generateMipMaps: true }
+ ambientOcclusion: TextureLoader { source: "qrc:/assets/textures/no-ao.png" }
}
}
@@ -296,14 +296,14 @@ Entity {
MetalRoughMaterial {
id: matSphere5Material
baseColor: TextureLoader {
- source: "assets/textures/gold_leaf_waste/gold_leaf_waste_basecolor.png"
+ source: "qrc:/assets/textures/gold_leaf_waste/gold_leaf_waste_basecolor.png"
format: Texture.SRGB8_Alpha8
generateMipMaps: true
}
- metalness: TextureLoader { source: "assets/textures/gold_leaf_waste/gold_leaf_waste_metallic.png"; generateMipMaps: true }
- roughness: TextureLoader { source: "assets/textures/gold_leaf_waste/gold_leaf_waste_roughness.png"; generateMipMaps: true }
- normal: TextureLoader { source: "assets/textures/gold_leaf_waste/gold_leaf_waste_normal.png"; generateMipMaps: true }
- ambientOcclusion: TextureLoader { source: "assets/textures/no-ao.png" }
+ metalness: TextureLoader { source: "qrc:/assets/textures/gold_leaf_waste/gold_leaf_waste_metallic.png"; generateMipMaps: true }
+ roughness: TextureLoader { source: "qrc:/assets/textures/gold_leaf_waste/gold_leaf_waste_roughness.png"; generateMipMaps: true }
+ normal: TextureLoader { source: "qrc:/assets/textures/gold_leaf_waste/gold_leaf_waste_normal.png"; generateMipMaps: true }
+ ambientOcclusion: TextureLoader { source: "qrc:/assets/textures/no-ao.png" }
}
}
}