Meshroom/meshroom/ui/qml/Viewer3D/Materials/SphericalHarmonicsEffect.qml
Candice Bentéjac 138cc18864 [qt6][Materials] Use correct graphics API and update SH shaders
With Qt6, OpenGL is not used directly anymore, and we thus must use
the RHI backend, set to version 1.0.

The SphericalHarmonics shaders, which were previously written in OpenGL,
need to be updated accordingly.
2024-11-07 18:09:07 +01:00

36 lines
932 B
QML

import Qt3D.Core 2.6
import Qt3D.Render 2.6
Effect {
id: root
parameters: [
Parameter { name: "shCoeffs[0]"; value: [] },
Parameter { name: "displayNormals"; value: false }
]
techniques: [
Technique {
graphicsApiFilter {
api: GraphicsApiFilter.RHI
profile: GraphicsApiFilter.CoreProfile
majorVersion: 1
minorVersion: 0
}
filterKeys: [ FilterKey { name: "renderingStyle"; value: "forward" } ]
renderPasses: [
RenderPass {
shaderProgram: ShaderProgram {
vertexShaderCode: loadSource(Qt.resolvedUrl("shaders/SphericalHarmonics.vert"))
fragmentShaderCode: loadSource(Qt.resolvedUrl("shaders/SphericalHarmonics.frag"))
}
}
]
}
]
}