summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/simplecustommaterial/SimpleMaterial.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qt3d/simplecustommaterial/SimpleMaterial.qml')
-rw-r--r--examples/qt3d/simplecustommaterial/SimpleMaterial.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/qt3d/simplecustommaterial/SimpleMaterial.qml b/examples/qt3d/simplecustommaterial/SimpleMaterial.qml
index 2419362b6..e3f964e1e 100644
--- a/examples/qt3d/simplecustommaterial/SimpleMaterial.qml
+++ b/examples/qt3d/simplecustommaterial/SimpleMaterial.qml
@@ -71,6 +71,8 @@ Material {
//! [1]
property string vertex: "qrc:/shaders/gl3/simpleColor.vert"
property string fragment: "qrc:/shaders/gl3/simpleColor.frag"
+ property string vertexRHI: "qrc:/shaders/gl45/simpleColor.vert"
+ property string fragmentRHI: "qrc:/shaders/gl45/simpleColor.frag"
property string vertexES: "qrc:/shaders/es2/simpleColor.vert"
property string fragmentES: "qrc:/shaders/es2/simpleColor.frag"
//! [1]
@@ -92,6 +94,11 @@ Material {
vertexShaderCode: loadSource(parent.vertexES)
fragmentShaderCode: loadSource(parent.fragmentES)
}
+ ShaderProgram {
+ id: rhiShader
+ vertexShaderCode: loadSource(parent.vertexRHI)
+ fragmentShaderCode: loadSource(parent.fragmentRHI)
+ }
//! [2]
techniques: [
@@ -135,6 +142,19 @@ Material {
renderPasses: RenderPass {
shaderProgram: es2Shader
}
+ },
+ // RHI 1.0
+ Technique {
+ filterKeys: [forward]
+ graphicsApiFilter {
+ api: GraphicsApiFilter.RHI
+ profile: GraphicsApiFilter.NoProfile
+ majorVersion: 1
+ minorVersion: 0
+ }
+ renderPasses: RenderPass {
+ shaderProgram: rhiShader
+ }
}
]
}