mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-18 12:15:27 +00:00
frame around the display is now transparent changes in the default colors
This commit is contained in:
parent
768de5a4a0
commit
ff1b3be708
@ -2,7 +2,7 @@ import QtQuick 2.0
|
|||||||
|
|
||||||
Item{
|
Item{
|
||||||
property color background_color: "#000000"
|
property color background_color: "#000000"
|
||||||
property color font_color: "#ffff55"
|
property color font_color: "#66ff66"
|
||||||
|
|
||||||
property real noise_strength: 0.1
|
property real noise_strength: 0.1
|
||||||
property real screen_distortion: 0.15
|
property real screen_distortion: 0.15
|
||||||
|
@ -45,13 +45,13 @@ ApplicationWindow{
|
|||||||
ShaderEffectSource{
|
ShaderEffectSource{
|
||||||
id: theSource
|
id: theSource
|
||||||
sourceItem: terminal
|
sourceItem: terminal
|
||||||
sourceRect: Qt.rect(-20, -20, terminal.width + 40, terminal.height + 40)
|
//sourceRect: Qt.rect(-20, -20, terminal.width + 40, terminal.height + 40)
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderEffect {
|
ShaderEffect {
|
||||||
id: shadercontainer
|
id: shadercontainer
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
blending: false
|
blending: true
|
||||||
z: 2
|
z: 2
|
||||||
property color font_color: shadersettings.font_color
|
property color font_color: shadersettings.font_color
|
||||||
property color background_color: shadersettings.background_color
|
property color background_color: shadersettings.background_color
|
||||||
@ -134,17 +134,23 @@ ApplicationWindow{
|
|||||||
|
|
||||||
//vec4 color = texture2D(source, coords);
|
//vec4 color = texture2D(source, coords);
|
||||||
vec4 color = blurredColor(source, coords);
|
vec4 color = blurredColor(source, coords);
|
||||||
float alpha = getScanlineIntensity(coords) * step(0.0, coords.x) * step(-1.0, -coords.x) * step(0.0, coords.y) * step(-1.0, -coords.y);
|
float scanline_alpha = getScanlineIntensity(coords);
|
||||||
//float alpha = 1.0;
|
float inside = step(0.0, coords.x) * step(-1.0, -coords.x) * step(0.0, coords.y) * step(-1.0, -coords.y);
|
||||||
float noise = stepNoise(coords) * noise_strength;
|
float noise = stepNoise(coords) * noise_strength;
|
||||||
float randomPass = randomPass(coords) * glowing_line_strength;
|
float randomPass = randomPass(coords) * glowing_line_strength;
|
||||||
vec4 added_color = (noise + randomPass) * font_color;
|
vec4 added_color = (noise + randomPass) * font_color;
|
||||||
vec4 finalColor = color + added_color;
|
vec4 finalColor = color + added_color;
|
||||||
|
finalColor = mix(finalColor, background_color, 1.0 - scanline_alpha);
|
||||||
gl_FragColor = mix(finalColor, background_color, 1.0 - alpha);
|
gl_FragColor = vec4(finalColor.rgb * inside, inside);
|
||||||
}"
|
}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
z: 1
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
|
||||||
TerminalScreen {
|
TerminalScreen {
|
||||||
id: terminal
|
id: terminal
|
||||||
width: mainwindow.width
|
width: mainwindow.width
|
||||||
@ -155,14 +161,14 @@ ApplicationWindow{
|
|||||||
Component.onCompleted: terminal.screen.sendKey("l", 76, 67108864);
|
Component.onCompleted: terminal.screen.sendKey("l", 76, 67108864);
|
||||||
}
|
}
|
||||||
|
|
||||||
RadialGradient{
|
// RadialGradient{
|
||||||
z: 4
|
// z: 4
|
||||||
anchors.fill: terminal
|
// anchors.fill: terminal
|
||||||
cached: true
|
// cached: true
|
||||||
opacity: 0.3
|
// opacity: 0.3
|
||||||
gradient: Gradient{
|
// gradient: Gradient{
|
||||||
GradientStop{position: 0.0; color: shadersettings.font_color}
|
// GradientStop{position: 0.0; color: shadersettings.font_color}
|
||||||
GradientStop{position: 0.7; color: shadersettings.background_color}
|
// GradientStop{position: 0.7; color: shadersettings.background_color}
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user