diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-04-11 14:58:17 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2016-04-23 11:14:30 +0000 |
commit | 0542f1614aa6d50c4c9809fb0ce5f1adb5666d67 (patch) | |
tree | 77a1ed41c16262f5cc7aa9ddb2d66d3f9b61a719 /src/quick3d/imports/render/defaults | |
parent | 8677f62fa690efa29fbb6f870af1ea2b4e7111cf (diff) |
Move defaults and geometries out of Qt3DRender and into Qt3DExtras
QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on.
Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick3d/imports/render/defaults')
13 files changed, 0 insertions, 1621 deletions
diff --git a/src/quick3d/imports/render/defaults/defaults.pri b/src/quick3d/imports/render/defaults/defaults.pri deleted file mode 100644 index 5487dac49..000000000 --- a/src/quick3d/imports/render/defaults/defaults.pri +++ /dev/null @@ -1,19 +0,0 @@ -# When adding new QML files that should be built into the plugin, -# add them to this variable and they will be listed into a generated -# resource file. -# -# To have the plugin register them as types, add an entries to the -# qmldir array in qt3dquick3drenderplugin.cpp -QML_FILES = \ - $$PWD/qml/PhongMaterial.qml \ - $$PWD/qml/DiffuseMapMaterial.qml \ - $$PWD/qml/DiffuseSpecularMapMaterial.qml \ - $$PWD/qml/NormalDiffuseMapMaterial.qml \ - $$PWD/qml/NormalDiffuseMapAlphaMaterial.qml \ - $$PWD/qml/NormalDiffuseSpecularMapMaterial.qml \ - $$PWD/qml/ForwardRenderer.qml \ - $$PWD/qml/PerVertexColorMaterial.qml \ - $$PWD/qml/SkyboxEntity.qml \ - $$PWD/qml/GoochMaterial.qml \ - $$PWD/qml/PhongAlphaMaterial.qml \ - $$PWD/qml/TextureMaterial.qml diff --git a/src/quick3d/imports/render/defaults/qml/DiffuseMapMaterial.qml b/src/quick3d/imports/render/defaults/qml/DiffuseMapMaterial.qml deleted file mode 100644 index 6e5a843b0..000000000 --- a/src/quick3d/imports/render/defaults/qml/DiffuseMapMaterial.qml +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id: root - - property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) - property alias diffuse: diffuseTextureImage.source - property color specular: Qt.rgba( 0.01, 0.01, 0.01, 1.0 ) - property real shininess: 150.0 - property real textureScale: 1.0 - - parameters: [ - Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, - Parameter { - name: "diffuseTexture" - value: Texture2D { - id: diffuseTexture - minificationFilter: Texture.LinearMipMapLinear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - generateMipMaps: true - maximumAnisotropy: 16.0 - TextureImage { id: diffuseTextureImage; } - } - }, - Parameter { name: "ks"; value: Qt.vector3d(root.specular.r, root.specular.g, root.specular.b) }, - Parameter { name: "shininess"; value: root.shininess }, - Parameter { name: "texCoordScale"; value: textureScale } - ] - - effect: Effect { - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - ShaderProgram { - id: gl2Es2Shader - vertexShaderCode: loadSource("qrc:/shaders/es2/diffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/diffusemap.frag") - } - - ShaderProgram { - id: gl3Shader - vertexShaderCode: loadSource("qrc:/shaders/gl3/diffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/diffusemap.frag") - } - - techniques: [ - // OpenGL 3.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { shaderProgram: gl3Shader } - }, - - // OpenGL 2.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - }, - - // OpenGL ES 2 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/DiffuseSpecularMapMaterial.qml b/src/quick3d/imports/render/defaults/qml/DiffuseSpecularMapMaterial.qml deleted file mode 100644 index e5ec0562a..000000000 --- a/src/quick3d/imports/render/defaults/qml/DiffuseSpecularMapMaterial.qml +++ /dev/null @@ -1,145 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id: root - - property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) - property alias diffuse: diffuseTextureImage.source - property alias specular: specularTextureImage.source - property real shininess: 150.0 - property real textureScale: 1.0 - - parameters: [ - Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, - Parameter { - name: "diffuseTexture" - value: Texture2D { - id: diffuseTexture - minificationFilter: Texture.LinearMipMapLinear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - generateMipMaps: true - maximumAnisotropy: 16.0 - TextureImage { id: diffuseTextureImage; } - } - }, - Parameter { name: "specularTexture"; - value: Texture2D { - id: specularTexture - minificationFilter: Texture.LinearMipMapLinear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - generateMipMaps: true - maximumAnisotropy: 16.0 - TextureImage { id: specularTextureImage; } - } - }, - Parameter { name: "shininess"; value: root.shininess }, - Parameter { name: "texCoordScale"; value: textureScale } - ] - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - ShaderProgram { - id: gl2Es2Shader - vertexShaderCode: loadSource("qrc:/shaders/es2/diffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/diffusespecularmap.frag") - } - - ShaderProgram { - id: gl3Shader - vertexShaderCode: loadSource("qrc:/shaders/gl3/diffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/diffusespecularmap.frag") - } - - techniques: [ - // OpenGL 3.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { shaderProgram: gl3Shader } - }, - - // OpenGL 2.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - }, - - // OpenGL ES 2 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - } - ] - } -} diff --git a/src/quick3d/imports/render/defaults/qml/ForwardRenderer.qml b/src/quick3d/imports/render/defaults/qml/ForwardRenderer.qml deleted file mode 100644 index be30e7fb9..000000000 --- a/src/quick3d/imports/render/defaults/qml/ForwardRenderer.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -TechniqueFilter { - // Expose camera to allow user to choose which camera to use for rendering - property alias camera: cameraSelector.camera - property alias clearColor: clearBuffers.clearColor - property alias viewportRect: viewport.normalizedRect - property alias window: surfaceSelector.surface - - // Select the forward rendering Technique of any used Effect - matchAll: [ FilterKey { name: "renderingStyle"; value: "forward" } ] - - RenderSurfaceSelector { - id: surfaceSelector - - // Use the whole viewport - Viewport { - id: viewport - normalizedRect: Qt.rect(0.0, 0.0, 1.0, 1.0) - - // Use the specified camera - CameraSelector { - id : cameraSelector - FrustumCulling { - ClearBuffers { - id: clearBuffers - buffers : ClearBuffers.ColorDepthBuffer - clearColor: "white" - } - } - } - } - } -} diff --git a/src/quick3d/imports/render/defaults/qml/GoochMaterial.qml b/src/quick3d/imports/render/defaults/qml/GoochMaterial.qml deleted file mode 100644 index 51c656ae0..000000000 --- a/src/quick3d/imports/render/defaults/qml/GoochMaterial.qml +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id:root - property color diffuse: Qt.rgba( 0.0, 0.0, 0.0, 1.0 ) - property color specular: Qt.rgba( 0.0, 0.0, 0.0, 1.0 ) - property color coolColor: Qt.rgba( 0.0, 0.0, 0.4, 1.0 ) - property color warmColor: Qt.rgba( 0.4, 0.4, 0.0, 1.0 ) - property real alpha: 0.25 - property real beta: 0.5 - property real shininess: 100.0 - - ShaderProgram { - id: gl3GoochShader - vertexShaderCode: loadSource("qrc:/shaders/gl3/gooch.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/gooch.frag") - } - - ShaderProgram { - id: gl2es2GoochShader - vertexShaderCode: loadSource("qrc:/shaders/es2/gooch.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/gooch.frag") - } - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - parameters: [ - Parameter { name: "kd"; value: root.diffuse }, - Parameter { name: "ks"; value: root.specular }, - Parameter { name: "kblue"; value: root.coolColor }, - Parameter { name: "kyellow"; value: root.warmColor }, - Parameter { name: "alpha"; value: root.alpha }, - Parameter { name: "beta"; value: root.beta }, - Parameter { name: "shininess"; value: root.shininess } - ] - - techniques: [ - // GL 3 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 2 - } - renderPasses: RenderPass { - shaderProgram: gl3GoochShader - } - }, - - // GL 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2GoochShader - } - }, - - // ES 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2GoochShader - } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapAlphaMaterial.qml b/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapAlphaMaterial.qml deleted file mode 100644 index 6dfbf98c1..000000000 --- a/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapAlphaMaterial.qml +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id: root - - property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) - property alias diffuse: diffuseTextureImage.source - property color specular: Qt.rgba( 0.01, 0.01, 0.01, 1.0 ) - property alias normal: normalTextureImage.source - property real shininess: 150.0 - property real textureScale: 1.0 - - parameters: [ - Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, - Parameter { - name: "diffuseTexture" - value: Texture2D { - id: diffuseTexture - minificationFilter: Texture.LinearMipMapLinear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - generateMipMaps: true - maximumAnisotropy: 16.0 - TextureImage { id: diffuseTextureImage; } - } - }, - Parameter { - name: "normalTexture" - value: Texture2D { - id: normalTexture - minificationFilter: Texture.Linear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - maximumAnisotropy: 16.0 - TextureImage { id: normalTextureImage; } - } - }, - Parameter { name: "ks"; value: Qt.vector3d(root.specular.r, root.specular.g, root.specular.b) }, - Parameter { name: "shininess"; value: root.shininess }, - Parameter { name: "texCoordScale"; value: textureScale } - ] - - effect: Effect { - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - ShaderProgram { - id: gl2Es2Shader - vertexShaderCode: loadSource("qrc:/shaders/es2/normaldiffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/normaldiffusemapalpha.frag") - } - - ShaderProgram { - id: gl3Shader - vertexShaderCode: loadSource("qrc:/shaders/gl3/normaldiffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/normaldiffusemapalpha.frag") - } - - AlphaCoverage { id: alphaCoverageState } - DepthTest { id: depthTestState; depthFunction: DepthTest.Less } - - techniques: [ - // OpenGL 3.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { shaderProgram: gl3Shader; renderStates: [alphaCoverageState, depthTestState] } - }, - - // OpenGL 2.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader; renderStates: [alphaCoverageState, depthTestState] } - }, - - // OpenGL ES 2 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader; renderStates: [alphaCoverageState, depthTestState] } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapMaterial.qml b/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapMaterial.qml deleted file mode 100644 index eeb1d33d4..000000000 --- a/src/quick3d/imports/render/defaults/qml/NormalDiffuseMapMaterial.qml +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id: root - - property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) - property alias diffuse: diffuseTextureImage.source - property color specular: Qt.rgba( 0.01, 0.01, 0.01, 1.0 ) - property alias normal: normalTextureImage.source - property real shininess: 150.0 - property real textureScale: 1.0 - - parameters: [ - Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, - Parameter { - name: "diffuseTexture" - value: Texture2D { - id: diffuseTexture - minificationFilter: Texture.LinearMipMapLinear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - generateMipMaps: true - maximumAnisotropy: 16.0 - TextureImage { id: diffuseTextureImage; } - } - }, - Parameter { - name: "normalTexture" - value: Texture2D { - id: normalTexture - minificationFilter: Texture.Linear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - maximumAnisotropy: 16.0 - TextureImage { id: normalTextureImage; } - } - }, - Parameter { name: "ks"; value: Qt.vector3d(root.specular.r, root.specular.g, root.specular.b) }, - Parameter { name: "shininess"; value: root.shininess }, - Parameter { name: "texCoordScale"; value: textureScale } - ] - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - ShaderProgram { - id: gl2Es2Shader - vertexShaderCode: loadSource("qrc:/shaders/es2/normaldiffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/normaldiffusemap.frag") - } - - ShaderProgram { - id: gl3Shader - vertexShaderCode: loadSource("qrc:/shaders/gl3/normaldiffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/normaldiffusemap.frag") - } - - techniques: [ - // OpenGL 3.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { shaderProgram: gl3Shader } - }, - - // OpenGL 2.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - }, - - // OpenGL ES 2 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/NormalDiffuseSpecularMapMaterial.qml b/src/quick3d/imports/render/defaults/qml/NormalDiffuseSpecularMapMaterial.qml deleted file mode 100644 index d2c0efda0..000000000 --- a/src/quick3d/imports/render/defaults/qml/NormalDiffuseSpecularMapMaterial.qml +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id: root - - property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) - property alias diffuse: diffuseTextureImage.source - property alias specular: specularTextureImage.source - property alias normal: normalTextureImage.source - property real shininess: 150.0 - property real textureScale: 1.0 - - parameters: [ - Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, - Parameter { - name: "diffuseTexture" - value: Texture2D { - id: diffuseTexture - minificationFilter: Texture.LinearMipMapLinear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - generateMipMaps: true - maximumAnisotropy: 16.0 - TextureImage { id: diffuseTextureImage; } - } - }, - Parameter { name: "specularTexture"; - value: Texture2D { - id: specularTexture - minificationFilter: Texture.LinearMipMapLinear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - generateMipMaps: true - maximumAnisotropy: 16.0 - TextureImage { id: specularTextureImage; } - } - }, - Parameter { - name: "normalTexture" - value: Texture2D { - id: normalTexture - minificationFilter: Texture.Linear - magnificationFilter: Texture.Linear - wrapMode { - x: WrapMode.Repeat - y: WrapMode.Repeat - } - maximumAnisotropy: 16.0 - TextureImage { id: normalTextureImage; } - } - }, - Parameter { name: "shininess"; value: root.shininess }, - Parameter { name: "texCoordScale"; value: textureScale } - ] - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - ShaderProgram { - id: gl2Es2Shader - vertexShaderCode: loadSource("qrc:/shaders/es2/normaldiffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/normaldiffusespecularmap.frag") - } - - ShaderProgram { - id: gl3Shader - vertexShaderCode: loadSource("qrc:/shaders/gl3/normaldiffusemap.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/normaldiffusespecularmap.frag") - } - - techniques: [ - // OpenGL 3.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { shaderProgram: gl3Shader } - }, - - // OpenGL 2.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - }, - - // OpenGL ES 2 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { shaderProgram: gl2Es2Shader } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/PerVertexColorMaterial.qml b/src/quick3d/imports/render/defaults/qml/PerVertexColorMaterial.qml deleted file mode 100644 index 9e286f459..000000000 --- a/src/quick3d/imports/render/defaults/qml/PerVertexColorMaterial.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Lorenz Esch (TU Ilmenau). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id:root - - ShaderProgram { - id: gl3PerVertexColorShader - vertexShaderCode: loadSource("qrc:/shaders/gl3/pervertexcolor.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/pervertexcolor.frag") - } - - ShaderProgram { - id: gl2es2PerVertexColorShader - vertexShaderCode: loadSource("qrc:/shaders/es2/pervertexcolor.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/pervertexcolor.frag") - } - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - techniques: [ - // GL 3 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { - shaderProgram: gl3PerVertexColorShader - } - }, - - // GL 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2PerVertexColorShader - } - }, - - // ES 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2PerVertexColorShader - } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml b/src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml deleted file mode 100644 index 295d8abd1..000000000 --- a/src/quick3d/imports/render/defaults/qml/PhongAlphaMaterial.qml +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Paul Lemire -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id:root - property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) - property color diffuse: Qt.rgba( 0.7, 0.7, 0.7, 1.0 ) - property color specular: Qt.rgba( 0.01, 0.01, 0.01, 1.0 ) - property real shininess: 150.0 - property real alpha: 0.5 - - - ShaderProgram { - id: gl3PhongAlphaShader - vertexShaderCode: loadSource("qrc:/shaders/gl3/phong.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/phongalpha.frag") - } - - ShaderProgram { - id: gl2es2PhongAlphaShader - vertexShaderCode: loadSource("qrc:/shaders/es2/phong.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/phongalpha.frag") - } - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - parameters: [ - Parameter { name: "alpha"; value: root.alpha }, - Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, - Parameter { name: "kd"; value: Qt.vector3d(root.diffuse.r, root.diffuse.g, root.diffuse.b) }, - Parameter { name: "ks"; value: Qt.vector3d(root.specular.r, root.specular.g, root.specular.b) }, - Parameter { name: "shininess"; value: root.shininess } - ] - - techniques: [ - // GL 3 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { - shaderProgram: gl3PhongAlphaShader - renderStates: [ - NoDepthMask { }, - BlendEquationArguments { - sourceRgb: BlendEquationArguments.SourceAlpha - destinationRgb: BlendEquationArguments.OneMinusSourceAlpha - }, - BlendEquation {blendFunction: BlendEquation.Add} - ] - } - }, - - // GL 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2PhongAlphaShader - renderStates: [ - NoDepthMask { }, - BlendEquationArguments { - sourceRgb: BlendEquationArguments.SourceAlpha - destinationRgb: BlendEquationArguments.OneMinusSourceAlpha - }, - BlendEquation {blendFunction: BlendEquation.Add} - ] - } - }, - - // ES 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2PhongAlphaShader - renderStates: [ - NoDepthMask { }, - BlendEquationArguments { - sourceRgb: BlendEquationArguments.SourceAlpha - destinationRgb: BlendEquationArguments.OneMinusSourceAlpha - }, - BlendEquation {blendFunction: BlendEquation.Add} - ] - } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/PhongMaterial.qml b/src/quick3d/imports/render/defaults/qml/PhongMaterial.qml deleted file mode 100644 index e60bcefc8..000000000 --- a/src/quick3d/imports/render/defaults/qml/PhongMaterial.qml +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id:root - property color ambient: Qt.rgba( 0.05, 0.05, 0.05, 1.0 ) - property color diffuse: Qt.rgba( 0.7, 0.7, 0.7, 1.0 ) - property color specular: Qt.rgba( 0.01, 0.01, 0.01, 1.0 ) - property real shininess: 150.0 - - - ShaderProgram { - id: gl3PhongShader - vertexShaderCode: loadSource("qrc:/shaders/gl3/phong.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/phong.frag") - } - - ShaderProgram { - id: gl2es2PhongShader - vertexShaderCode: loadSource("qrc:/shaders/es2/phong.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/phong.frag") - } - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - parameters: [ - Parameter { name: "ka"; value: Qt.vector3d(root.ambient.r, root.ambient.g, root.ambient.b) }, - Parameter { name: "kd"; value: Qt.vector3d(root.diffuse.r, root.diffuse.g, root.diffuse.b) }, - Parameter { name: "ks"; value: Qt.vector3d(root.specular.r, root.specular.g, root.specular.b) }, - Parameter { name: "shininess"; value: root.shininess } - ] - - techniques: [ - // GL 3 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { - shaderProgram: gl3PhongShader - } - }, - - // GL 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2PhongShader - } - }, - - // ES 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2PhongShader - } - } - ] - } -} - diff --git a/src/quick3d/imports/render/defaults/qml/SkyboxEntity.qml b/src/quick3d/imports/render/defaults/qml/SkyboxEntity.qml deleted file mode 100644 index f3cb1f3bf..000000000 --- a/src/quick3d/imports/render/defaults/qml/SkyboxEntity.qml +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Entity { - - property alias cameraPosition: transform.translation; - property string baseName: ""; - property string extension: ".png" - - property TextureCubeMap skyboxTexture: TextureCubeMap { - generateMipMaps: false - magnificationFilter: Texture.Linear - minificationFilter: Texture.Linear - wrapMode { - x: WrapMode.ClampToEdge - y: WrapMode.ClampToEdge - } - TextureImage { face: Texture.CubeMapPositiveX; source: baseName + "_posx" + extension } - TextureImage { face: Texture.CubeMapPositiveY; source: baseName + "_posy" + extension } - TextureImage { face: Texture.CubeMapPositiveZ; source: baseName + "_posz" + extension } - TextureImage { face: Texture.CubeMapNegativeX; source: baseName + "_negx" + extension } - TextureImage { face: Texture.CubeMapNegativeY; source: baseName + "_negy" + extension } - TextureImage { face: Texture.CubeMapNegativeZ; source: baseName + "_negz" + extension } - } - - ShaderProgram { - id: gl3SkyboxShader - vertexShaderCode: loadSource("qrc:/shaders/gl3/skybox.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/skybox.frag") - } - - ShaderProgram { - id: gl2es2SkyboxShader - vertexShaderCode: loadSource("qrc:/shaders/es2/skybox.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/skybox.frag") - } - - CuboidMesh { - id: cuboidMesh - yzMeshResolution: Qt.size(2, 2) - xzMeshResolution: Qt.size(2, 2) - xyMeshResolution: Qt.size(2, 2) - } - - Transform { - id: transform - } - - Material { - id: skyboxMaterial - parameters: Parameter { name: "skyboxTexture"; value: skyboxTexture} - - effect: Effect { - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - techniques: [ - // GL3 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { - shaderProgram: gl3SkyboxShader - renderStates: [ - // cull front faces - CullFace { mode: CullFace.Front }, - DepthTest { depthFunction: DepthTest.LessOrEqual } - ] - } - }, - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2SkyboxShader - renderStates: [ - CullFace { mode: CullFace.Front }, - DepthTest { depthFunction: DepthTest.LessOrEqual } - ] - } - }, - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2SkyboxShader - renderStates: [ - CullFace { mode: CullFace.Front }, - DepthTest { depthFunction: DepthTest.LessOrEqual } - ] - } - } - ] - } - } - - components: [cuboidMesh, skyboxMaterial, transform] -} - diff --git a/src/quick3d/imports/render/defaults/qml/TextureMaterial.qml b/src/quick3d/imports/render/defaults/qml/TextureMaterial.qml deleted file mode 100644 index 28d3a1713..000000000 --- a/src/quick3d/imports/render/defaults/qml/TextureMaterial.qml +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt3D.Core 2.0 -import Qt3D.Render 2.0 - -Material { - id: root - property Texture2D texture: Texture2D {} - property alias textureOffset: texCoordOffset.offset - - ShaderProgram { - id: gl3Shader - vertexShaderCode: loadSource("qrc:/shaders/gl3/unlittexture.vert") - fragmentShaderCode: loadSource("qrc:/shaders/gl3/unlittexture.frag") - } - - ShaderProgram { - id: gl2es2Shader - vertexShaderCode: loadSource("qrc:/shaders/es2/unlittexture.vert") - fragmentShaderCode: loadSource("qrc:/shaders/es2/unlittexture.frag") - } - - effect: Effect { - - FilterKey { - id: forward - name: "renderingStyle" - value: "forward" - } - - parameters: [ - Parameter { - name: "diffuseTexture" - value: root.texture - }, - Parameter { - id: texCoordOffset - property vector2d offset: Qt.vector2d(0, 0) - name: "texCoordOffset" - value: offset - } - - ] - - techniques: [ - // OpenGL 3.1 - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - profile: GraphicsApiFilter.CoreProfile - majorVersion: 3 - minorVersion: 1 - } - renderPasses: RenderPass { - shaderProgram: gl3Shader - } - }, - - // GL 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGL - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2Shader - } - }, - - // ES 2 Technique - Technique { - filterKeys: [ forward ] - graphicsApiFilter { - api: GraphicsApiFilter.OpenGLES - profile: GraphicsApiFilter.NoProfile - majorVersion: 2 - minorVersion: 0 - } - renderPasses: RenderPass { - shaderProgram: gl2es2Shader - } - } - ] - } -} |