1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-01-18 12:15:27 +00:00

Limit screen curvature effect.

This commit is contained in:
Filippo Scognamiglio 2018-11-23 22:35:48 +01:00
parent dead1197bd
commit b8e3cd5d64
4 changed files with 4 additions and 3 deletions

View File

@ -30,6 +30,7 @@ QtObject{
// STATIC CONSTANTS ////////////////////////////////////////////////////////
readonly property real screenCurvatureSize: 0.2
readonly property real minimumFontScaling: 0.25
readonly property real maximumFontScaling: 2.50

View File

@ -209,7 +209,7 @@ Item{
y = y / height;
var cc = Qt.size(0.5 - x, 0.5 - y);
var distortion = (cc.height * cc.height + cc.width * cc.width) * appSettings.screenCurvature;
var distortion = (cc.height * cc.height + cc.width * cc.width) * appSettings.screenCurvature * appSettings.screenCurvatureSize;
return Qt.point((x - cc.width * (1+distortion) * distortion) * kterminal.width,
(y - cc.height * (1+distortion) * distortion) * kterminal.height)

View File

@ -44,7 +44,7 @@ ShaderEffect {
property size scaleNoiseSize: Qt.size((width) / (noiseTexture.width * appSettings.windowScaling * appSettings.totalFontScaling),
(height) / (noiseTexture.height * appSettings.windowScaling * appSettings.totalFontScaling))
property real screenCurvature: appSettings.screenCurvature
property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize
property real glowingLine: appSettings.glowingLine * 0.2
property real chromaColor: appSettings.chromaColor;

View File

@ -105,7 +105,7 @@ Item{
id: staticLight
property alias source: framesource
property alias normals: framesourcenormals
property real screenCurvature: appSettings.screenCurvature
property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize
property size curvature_coefficients: Qt.size(width / mainShader.width, height / mainShader.height)
property real ambientLight: appSettings.ambientLight * 0.9 + 0.1
property color fontColor: appSettings.fontColor