1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2026-02-08 00:32:27 +00:00

Add configurable screen radius and make frame look a little bit better.

This commit is contained in:
Filippo Scognamiglio
2026-01-04 16:54:43 +01:00
parent 33adf4106f
commit 048cfcce81
43 changed files with 59 additions and 32 deletions

View File

@@ -26,23 +26,24 @@ ShaderEffect {
property color _backgroundColor: appSettings.backgroundColor
property color _fontColor: appSettings.fontColor
property color _lightColor: Utils.mix(_fontColor, _backgroundColor, 0.2)
property real _ambientLight: appSettings.ambientLight
property color frameColor: Utils.sum(
Utils.scaleColor(_staticFrameColor, 0.8 * _ambientLight),
Utils.scaleColor(_lightColor, 0.2)
property color frameColor: Utils.mix(
Utils.scaleColor(_lightColor, 0.2),
_staticFrameColor,
0.125 + 0.750 * ambientLight
)
property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize
// TODO FILIPPO... Get rid of those...
// Coefficient of the log curve used to approximate shadowing
property real frameShadowCoeff: 0.0125//Utils.lint(0.05, 0.025, _ambientLight)
property real frameShininess: appSettings.frameShininess
property real frameSize: appSettings.frameSize
property real qt_Opacity: 1.0
property real screenRadius: appSettings.screenRadius
property size viewportSize: Qt.size(width, height)
property real ambientLight: appSettings.ambientLight
vertexShader: "qrc:/shaders/terminal_frame.vert.qsb"
fragmentShader: "qrc:/shaders/terminal_frame.frag.qsb"