mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-31 23:38:48 +02:00
[qt6] Remove shaders from Meshroom and move them to QtAliceVision
This commit is contained in:
parent
595e8f6c7a
commit
d5b5163828
2 changed files with 2 additions and 35 deletions
|
@ -752,16 +752,7 @@ RowLayout {
|
|||
width: control.availableWidth
|
||||
height: control.availableHeight
|
||||
blending: false
|
||||
fragmentShader: "
|
||||
varying mediump vec2 qt_TexCoord0;
|
||||
vec3 hsv2rgb(vec3 c) {
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
void main() {
|
||||
gl_FragColor = vec4(hsv2rgb(vec3(qt_TexCoord0.x, 1.0, 1.0)), 1.0);
|
||||
}"
|
||||
fragmentShader: "qrc:/shaders/AttributeItemDelegate.frag.qsb"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,30 +70,6 @@ Item {
|
|||
property variant src: image
|
||||
property variant uvCenterOffset
|
||||
|
||||
vertexShader: "
|
||||
#version 330 core
|
||||
uniform highp mat4 qt_Matrix;
|
||||
attribute highp vec4 qt_Vertex;
|
||||
attribute highp vec2 qt_MultiTexCoord0;
|
||||
out highp vec2 coord;
|
||||
void main() {
|
||||
coord = qt_MultiTexCoord0;
|
||||
gl_Position = qt_Matrix * qt_Vertex;
|
||||
}"
|
||||
fragmentShader: "
|
||||
#version 330 core
|
||||
in highp vec2 coord;
|
||||
uniform sampler2D src;
|
||||
uniform lowp vec2 uvCenterOffset;
|
||||
uniform lowp float qt_Opacity;
|
||||
out vec4 fragColor;
|
||||
void main() {
|
||||
vec2 xy = coord + uvCenterOffset;
|
||||
fragColor = texture2D(src, xy);
|
||||
fragColor.rgb *= qt_Opacity;
|
||||
fragColor.a = qt_Opacity;
|
||||
// remove undistortion black pixels
|
||||
fragColor.a *= step(0.001, fragColor.r + fragColor.g + fragColor.b);
|
||||
}"
|
||||
fragmentShader: "qrc:/shaders/ImageOverlay.frag.qsb"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue