Added lightly smoothed black frame around the screen.
This commit is contained in:
@@ -380,6 +380,9 @@ Item{
|
||||
id: rasterizationEffect
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
property real outColor: 0.0
|
||||
property real dispX: 5 / width
|
||||
property real dispY: 5 / height
|
||||
property size virtual_resolution: Qt.size(kterminal.width, kterminal.height)
|
||||
|
||||
blending: false
|
||||
@@ -389,6 +392,9 @@ Item{
|
||||
|
||||
"varying highp vec2 qt_TexCoord0;
|
||||
uniform highp vec2 virtual_resolution;
|
||||
uniform highp float dispX;
|
||||
uniform highp float dispY;
|
||||
uniform mediump float outColor;
|
||||
|
||||
highp float getScanlineIntensity(vec2 coords) {
|
||||
highp float result = 1.0;" +
|
||||
@@ -407,6 +413,11 @@ Item{
|
||||
"float distance = length(vec2(0.5) - qt_TexCoord0);" +
|
||||
"color = mix(color, 0.0, 1.2 * distance * distance);" +
|
||||
|
||||
"color *= outColor + smoothstep(0.00, dispX, qt_TexCoord0.x) * (1.0 - outColor);" +
|
||||
"color *= outColor + smoothstep(0.00, dispY, qt_TexCoord0.y) * (1.0 - outColor);" +
|
||||
"color *= outColor + (1.0 - smoothstep(1.00 - dispX, 1.00, qt_TexCoord0.x)) * (1.0 - outColor);" +
|
||||
"color *= outColor + (1.0 - smoothstep(1.00 - dispY, 1.00, qt_TexCoord0.y)) * (1.0 - outColor);" +
|
||||
|
||||
"gl_FragColor.a = color;" +
|
||||
"}"
|
||||
|
||||
@@ -417,6 +428,6 @@ Item{
|
||||
sourceItem: rasterizationEffect
|
||||
hideSource: true
|
||||
smooth: true
|
||||
wrapMode: ShaderEffectSource.Repeat
|
||||
wrapMode: ShaderEffectSource.ClampToEdge
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ ShaderEffect {
|
||||
"float color = 0.0;" +
|
||||
|
||||
(noise_strength !== 0 ? "
|
||||
float noiseVal = texture2D(noiseSource, qt_TexCoord0 + vec2(fract(time / 51.0), fract(time / 237.0))).a;
|
||||
float noiseVal = texture2D(noiseSource, coords + vec2(fract(time / 51.0), fract(time / 237.0))).a;
|
||||
color += noiseVal * noise * (1.0 - distance * 1.3);" : "") +
|
||||
|
||||
(glowing_line_strength !== 0 ? "
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import QtQuick 2.2
|
||||
|
||||
ShaderEffect{
|
||||
property variant source: framesource
|
||||
property real screen_distorsion: shadersettings.screen_distortion
|
||||
|
||||
fragmentShader: "
|
||||
uniform sampler2D source;
|
||||
uniform highp float screen_distorsion;
|
||||
varying highp vec2 qt_TexCoord0;
|
||||
|
||||
vec2 distortCoordinates(vec2 coords){
|
||||
vec2 cc = coords - vec2(0.5);
|
||||
float dist = dot(cc, cc) * screen_distorsion;
|
||||
return (coords + cc * (1.0 + dist) * dist);
|
||||
}
|
||||
|
||||
void main(){
|
||||
vec2 coords = distortCoordinates(qt_TexCoord0);
|
||||
float inside = texture2D(source, coords).a;
|
||||
gl_FragColor = vec4(vec3(0.0), inside);
|
||||
}"
|
||||
}
|
||||
@@ -11,7 +11,6 @@
|
||||
<file>frames/images/screen-frame-original.png</file>
|
||||
<file>frames/WhiteSimpleFrame.qml</file>
|
||||
<file>frames/utils/FrameShader.qml</file>
|
||||
<file>frames/utils/NoFrameShader.qml</file>
|
||||
<file>frames/utils/TerminalFrame.qml</file>
|
||||
<file>SizeOverlay.qml</file>
|
||||
<file>ShaderTerminal.qml</file>
|
||||
|
||||
Reference in New Issue
Block a user