mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +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
|
width: control.availableWidth
|
||||||
height: control.availableHeight
|
height: control.availableHeight
|
||||||
blending: false
|
blending: false
|
||||||
fragmentShader: "
|
fragmentShader: "qrc:/shaders/AttributeItemDelegate.frag.qsb"
|
||||||
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);
|
|
||||||
}"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,30 +70,6 @@ Item {
|
||||||
property variant src: image
|
property variant src: image
|
||||||
property variant uvCenterOffset
|
property variant uvCenterOffset
|
||||||
|
|
||||||
vertexShader: "
|
fragmentShader: "qrc:/shaders/ImageOverlay.frag.qsb"
|
||||||
#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);
|
|
||||||
}"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue