Kuesa Iro-Materials-Gallery QML Example
import Qt3D.Core 2.12
import Qt3D.Render 2.12
import Qt3D.Input 2.12
import Qt3D.Extras 2.12
import QtQuick 2.12
import Kuesa 1.2 as Kuesa
import Kuesa.Effects 1.1 as KuesaFX
import Kuesa.Utils 1.3 as KuesaUtils
Kuesa.SceneEntity {
id: root3D
signal clickedAt(int x, int y)
components: [
RenderSettings {
activeFrameGraph: Kuesa.ForwardRenderer {
id: frameGraph
camera: camera
skinning: true
clearColor: Qt.rgba(0.1, 0.1, 0.1, 1.0)
}
pickingSettings.pickMethod: PickingSettings.TrianglePicking
},
InputSettings { },
EnvironmentLight {
irradiance: TextureLoader {
source: "pink_sunrise_16f_irradiance" + ((!root3D.es2) ? ".dds" : "_es2.dds")
minificationFilter: Texture.LinearMipMapLinear
magnificationFilter: Texture.Linear
wrapMode {
x: WrapMode.ClampToEdge
y: WrapMode.ClampToEdge
}
generateMipMaps: false
}
specular: TextureLoader {
source: "pink_sunrise_16f_specular" + ((!root3D.es2) ? ".dds" : "_es2.dds")
minificationFilter: Texture.LinearMipMapLinear
magnificationFilter: Texture.Linear
wrapMode {
x: WrapMode.ClampToEdge
y: WrapMode.ClampToEdge
}
generateMipMaps: false
}
},
ObjectPicker {
onClicked: {
_materialInspector.inspect(pick)
root3D.clickedAt(pick.position.x, pick.position.y)
}
}
]
Camera {
id: camera
position: Qt.vector3d(15.0, 5.0, 15)
upVector: Qt.vector3d(0.0, 1.0, 0.0)
viewCenter: Qt.vector3d(0.0, 0.0, 0.0)
aspectRatio: _view.width / _view.height
}
KuesaUtils.OrbitCameraController {
camera: camera
windowSize: Qt.size(_view.width, _view.height)
}
Kuesa.GLTF2Importer {
id: gltf2importer
sceneEntity: root3D
assignNames: true
source: "qrc:/iro-materials-gallery.gltf"
options.generateTangents: true
}
}