mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 15:12:28 +00:00 
			
		
		
		
	Fix: various small improvements.
This commit is contained in:
		| @@ -81,7 +81,7 @@ QtObject{ | |||||||
|     property real fontScaling: 1.0 |     property real fontScaling: 1.0 | ||||||
|     property real fontWidth: 1.0 |     property real fontWidth: 1.0 | ||||||
|  |  | ||||||
|     property var fontNames: ["TERMINUS", "COMMODORE_PET", "COMMODORE_PET"] |     property var fontNames: ["HERMIT", "COMMODORE_PET", "COMMODORE_PET"] | ||||||
|     property var fontlist: fontManager.item.fontlist |     property var fontlist: fontManager.item.fontlist | ||||||
|  |  | ||||||
|     signal terminalFontChanged(string fontSource, int pixelSize, int lineSpacing, real screenScaling, real fontWidth) |     signal terminalFontChanged(string fontSource, int pixelSize, int lineSpacing, real screenScaling, real fontWidth) | ||||||
| @@ -317,6 +317,8 @@ QtObject{ | |||||||
|  |  | ||||||
|         fontNames[rasterization] = settings.fontName !== undefined ? settings.fontName : fontNames[rasterization]; |         fontNames[rasterization] = settings.fontName !== undefined ? settings.fontName : fontNames[rasterization]; | ||||||
|         fontWidth = settings.fontWidth !== undefined ? settings.fontWidth : fontWidth; |         fontWidth = settings.fontWidth !== undefined ? settings.fontWidth : fontWidth; | ||||||
|  |  | ||||||
|  |         handleFontChanged(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     function storeCustomProfiles(){ |     function storeCustomProfiles(){ | ||||||
| @@ -365,47 +367,47 @@ QtObject{ | |||||||
|     property ListModel profilesList: ListModel{ |     property ListModel profilesList: ListModel{ | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "Default Amber" |             text: "Default Amber" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.65,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS","fontColor":"#ff8100","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.08,"jitter":0.18,"burnIn":0.4,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.65,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"HERMIT","fontColor":"#ff8100","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.4,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "Default Green" |             text: "Default Green" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.08,"jitter":0.18,"burnIn":0.45,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"HERMIT","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.45,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "Default Scanlines" |             text: "Default Scanlines" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS","fontColor":"#00ff5b","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.07,"jitter":0.11,"burnIn":0.4,"staticNoise":0.05,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"COMMODORE_PET","fontColor":"#00ff5b","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.14,"jitter":0.11,"burnIn":0.4,"staticNoise":0.05,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "Default Pixelated" |             text: "Default Pixelated" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS","fontColor":"#ff8100","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.1,"jitter":0,"burnIn":0.45,"staticNoise":0.14,"rasterization":2,"screenCurvature":0.05,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0,"brightness":0.5,"flickering":0.2,"contrast":0.85,"fontName":"COMMODORE_PET","fontColor":"#ffffff","frameName":"ROUGH_BLACK_FRAME","glowingLine":0.2,"horizontalSync":0.2,"jitter":0,"burnIn":0.45,"staticNoise":0.19,"rasterization":2,"screenCurvature":0.05,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "Apple ][" |             text: "Apple ][" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.5,"brightness":0.5,"flickering":0.2,"contrast":0.85,"fontName":"APPLE_II","fontColor":"#2fff91","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.22,"horizontalSync":0.08,"jitter":0.1,"burnIn":0.65,"staticNoise":0.08,"rasterization":1,"screenCurvature":0.18,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.5,"brightness":0.5,"flickering":0.2,"contrast":0.85,"fontName":"APPLE_II","fontColor":"#2fff91","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.22,"horizontalSync":0.16,"jitter":0.1,"burnIn":0.65,"staticNoise":0.08,"rasterization":1,"screenCurvature":0.18,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "Vintage" |             text: "Vintage" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.54,"contrast":0.85,"fontName":"TERMINUS","fontColor":"#00ff3e","frameName":"ROUGH_BLACK_FRAME","glowingLine":0.3,"horizontalSync":0.2,"jitter":0.4,"burnIn":0.75,"staticNoise":0.2,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.5,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.9,"contrast":0.80,"fontName":"COMMODORE_PET","fontColor":"#00ff3e","frameName":"ROUGH_BLACK_FRAME","glowingLine":0.3,"horizontalSync":0.42,"jitter":0.4,"burnIn":0.75,"staticNoise":0.2,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "IBM Dos" |             text: "IBM Dos" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.07,"contrast":0.85,"fontName":"IBM_DOS","fontColor":"#ffffff","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.13,"horizontalSync":0,"jitter":0.08,"burnIn":0.3,"staticNoise":0.03,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":1,"saturationColor":0,"rbgShift":0.5,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.07,"contrast":0.85,"fontName":"IBM_DOS","fontColor":"#ffffff","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.13,"horizontalSync":0,"jitter":0.16,"burnIn":0.3,"staticNoise":0.03,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":1,"saturationColor":0,"rbgShift":0.35,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "IBM 3278" |             text: "IBM 3278" | ||||||
|             obj_string: '{"ambientLight":0.1,"backgroundColor":"#000000","bloom":0.15,"brightness":0.5,"flickering":0,"contrast":0.95,"fontName":"IBM_3278","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0,"horizontalSync":0,"jitter":0,"burnIn":0.6,"staticNoise":0,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.1,"backgroundColor":"#000000","bloom":0.15,"brightness":0.5,"flickering":0,"contrast":0.85,"fontName":"IBM_3278","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0,"horizontalSync":0,"jitter":0,"burnIn":0.6,"staticNoise":0,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             text: "Transparent Green" |             text: "Transparent Green" | ||||||
|             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.45,"brightness":0.5,"flickering":0.20,"contrast":0.85,"fontName":"TERMINUS","fontColor":"#0ccc68","frameName":"NO_FRAME","glowingLine":0.16,"horizontalSync":0.05,"jitter":0.20,"burnIn":0.25,"staticNoise":0.20,"rasterization":0,"screenCurvature":0.05,"windowOpacity":0.60,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' |             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.45,"brightness":0.5,"flickering":0.20,"contrast":0.85,"fontName":"HERMIT","fontColor":"#0ccc68","frameName":"NO_FRAME","glowingLine":0.16,"horizontalSync":0.1,"jitter":0.20,"burnIn":0.25,"staticNoise":0.20,"rasterization":0,"screenCurvature":0.05,"windowOpacity":0.60,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0}' | ||||||
|             builtin: true |             builtin: true | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -31,15 +31,6 @@ QtObject{ | |||||||
|     property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth |     property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth | ||||||
|  |  | ||||||
|     property ListModel fontlist: ListModel{ |     property ListModel fontlist: ListModel{ | ||||||
|         ListElement{ |  | ||||||
|             name: "PROGGY_TINY" |  | ||||||
|             text: "Proggy Tiny (Modern)" |  | ||||||
|             source: "fonts/modern-proggy-tiny/ProggyTiny.ttf" |  | ||||||
|             lineSpacing: 1 |  | ||||||
|             pixelSize: 16 |  | ||||||
|             baseScaling: 3.5 |  | ||||||
|             fontWidth: 0.9 |  | ||||||
|         } |  | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             name: "COMMODORE_PET" |             name: "COMMODORE_PET" | ||||||
|             text: "Commodore PET (1977)" |             text: "Commodore PET (1977)" | ||||||
| @@ -49,6 +40,15 @@ QtObject{ | |||||||
|             baseScaling: 4.0 |             baseScaling: 4.0 | ||||||
|             fontWidth: 0.8 |             fontWidth: 0.8 | ||||||
|         } |         } | ||||||
|  |         ListElement{ | ||||||
|  |             name: "PROGGY_TINY" | ||||||
|  |             text: "Proggy Tiny (Modern)" | ||||||
|  |             source: "fonts/modern-proggy-tiny/ProggyTiny.ttf" | ||||||
|  |             lineSpacing: 1 | ||||||
|  |             pixelSize: 16 | ||||||
|  |             baseScaling: 4.0 | ||||||
|  |             fontWidth: 0.9 | ||||||
|  |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             name: "APPLE_II" |             name: "APPLE_II" | ||||||
|             text: "Apple ][ (1977)" |             text: "Apple ][ (1977)" | ||||||
|   | |||||||
| @@ -31,15 +31,6 @@ QtObject{ | |||||||
|     property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth |     property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth | ||||||
|  |  | ||||||
|     property ListModel fontlist: ListModel{ |     property ListModel fontlist: ListModel{ | ||||||
|         ListElement{ |  | ||||||
|             name: "PROGGY_TINY" |  | ||||||
|             text: "Proggy Tiny (Modern)" |  | ||||||
|             source: "fonts/modern-proggy-tiny/ProggyTiny.ttf" |  | ||||||
|             lineSpacing: 1 |  | ||||||
|             pixelSize: 16 |  | ||||||
|             baseScaling: 3.5 |  | ||||||
|             fontWidth: 0.9 |  | ||||||
|         } |  | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             name: "COMMODORE_PET" |             name: "COMMODORE_PET" | ||||||
|             text: "Commodore PET (1977)" |             text: "Commodore PET (1977)" | ||||||
| @@ -49,6 +40,15 @@ QtObject{ | |||||||
|             baseScaling: 4.0 |             baseScaling: 4.0 | ||||||
|             fontWidth: 0.7 |             fontWidth: 0.7 | ||||||
|         } |         } | ||||||
|  |         ListElement{ | ||||||
|  |             name: "PROGGY_TINY" | ||||||
|  |             text: "Proggy Tiny (Modern)" | ||||||
|  |             source: "fonts/modern-proggy-tiny/ProggyTiny.ttf" | ||||||
|  |             lineSpacing: 1 | ||||||
|  |             pixelSize: 16 | ||||||
|  |             baseScaling: 4.0 | ||||||
|  |             fontWidth: 0.9 | ||||||
|  |         } | ||||||
|         ListElement{ |         ListElement{ | ||||||
|             name: "APPLE_II" |             name: "APPLE_II" | ||||||
|             text: "Apple ][ (1977)" |             text: "Apple ][ (1977)" | ||||||
|   | |||||||
| @@ -78,7 +78,11 @@ Tab{ | |||||||
|                         enabled: currentIndex >= 0 && !appSettings.profilesList.get(currentIndex).builtin |                         enabled: currentIndex >= 0 && !appSettings.profilesList.get(currentIndex).builtin | ||||||
|                         onClicked: { |                         onClicked: { | ||||||
|                             appSettings.profilesList.remove(currentIndex); |                             appSettings.profilesList.remove(currentIndex); | ||||||
|                             currentIndex = -1; // Unselect the profile. |                             profilesView.selection.clear(); | ||||||
|  |  | ||||||
|  |                             // TODO This is a very ugly workaround. The view didn't update on Qt 5.3.2. | ||||||
|  |                             profilesView.model = 0; | ||||||
|  |                             profilesView.model = appSettings.profilesList; | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
|                     Item { |                     Item { | ||||||
|   | |||||||
| @@ -27,8 +27,8 @@ import QtQuick.Dialogs 1.1 | |||||||
| Window { | Window { | ||||||
|     id: settings_window |     id: settings_window | ||||||
|     title: qsTr("Settings") |     title: qsTr("Settings") | ||||||
|     width: 560 |     width: 580 | ||||||
|     height: 360 |     height: 400 | ||||||
|  |  | ||||||
|     property int tabmargins: 15 |     property int tabmargins: 15 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -37,7 +37,7 @@ ShaderEffect { | |||||||
|     property size scaleNoiseSize: Qt.size((width) / (noiseTexture.width * appSettings.windowScaling * appSettings.fontScaling), |     property size scaleNoiseSize: Qt.size((width) / (noiseTexture.width * appSettings.windowScaling * appSettings.fontScaling), | ||||||
|                                           (height) / (noiseTexture.height * appSettings.windowScaling * appSettings.fontScaling)) |                                           (height) / (noiseTexture.height * appSettings.windowScaling * appSettings.fontScaling)) | ||||||
|  |  | ||||||
|     property real screen_distorsion: appSettings.screenCurvature |     property real screenCurvature: appSettings.screenCurvature | ||||||
|     property real glowingLine: appSettings.glowingLine |     property real glowingLine: appSettings.glowingLine | ||||||
|  |  | ||||||
|     property real chromaColor: appSettings.chromaColor; |     property real chromaColor: appSettings.chromaColor; | ||||||
| @@ -45,7 +45,7 @@ ShaderEffect { | |||||||
|     property real rbgShift: appSettings.rbgShift * 0.2 |     property real rbgShift: appSettings.rbgShift * 0.2 | ||||||
|  |  | ||||||
|     property real flickering: appSettings.flickering |     property real flickering: appSettings.flickering | ||||||
|     property real horizontalSync: appSettings.horizontalSync |     property real horizontalSync: appSettings.horizontalSync * 0.5 | ||||||
|  |  | ||||||
|     property bool frameReflections: appSettings.frameReflections |     property bool frameReflections: appSettings.frameReflections | ||||||
|  |  | ||||||
| @@ -66,7 +66,7 @@ ShaderEffect { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     property alias time: timeManager.time |     property alias time: timeManager.time | ||||||
|     property variant noiseSource: noiseShaderSource |     property ShaderEffectSource noiseSource: noiseShaderSource | ||||||
|  |  | ||||||
|     // If something goes wrong activate the fallback version of the shader. |     // If something goes wrong activate the fallback version of the shader. | ||||||
|     property bool fallBack: false |     property bool fallBack: false | ||||||
| @@ -167,8 +167,8 @@ ShaderEffect { | |||||||
|           ||(fallBack && (flickering || horizontalSync))) ? " |           ||(fallBack && (flickering || horizontalSync))) ? " | ||||||
|             uniform lowp sampler2D noiseSource; |             uniform lowp sampler2D noiseSource; | ||||||
|             uniform highp vec2 scaleNoiseSize;" : "") + |             uniform highp vec2 scaleNoiseSize;" : "") + | ||||||
|         (screen_distorsion !== 0 ? " |         (screenCurvature !== 0 ? " | ||||||
|             uniform highp float screen_distorsion;" : "") + |             uniform highp float screenCurvature;" : "") + | ||||||
|         (glowingLine !== 0 ? " |         (glowingLine !== 0 ? " | ||||||
|             uniform highp float glowingLine;" : "") + |             uniform highp float glowingLine;" : "") + | ||||||
|         (chromaColor !== 0 ? " |         (chromaColor !== 0 ? " | ||||||
| @@ -230,8 +230,8 @@ ShaderEffect { | |||||||
|             (staticNoise ? " |             (staticNoise ? " | ||||||
|                 float noise = staticNoise;" : "") + |                 float noise = staticNoise;" : "") + | ||||||
|  |  | ||||||
|             (screen_distorsion !== 0 ? " |             (screenCurvature !== 0 ? " | ||||||
|                 float distortion = dot(cc, cc) * screen_distorsion; |                 float distortion = dot(cc, cc) * screenCurvature; | ||||||
|                 vec2 staticCoords = (qt_TexCoord0 - cc * (1.0 + distortion) * distortion);" |                 vec2 staticCoords = (qt_TexCoord0 - cc * (1.0 + distortion) * distortion);" | ||||||
|             :" |             :" | ||||||
|                 vec2 staticCoords = qt_TexCoord0;") + |                 vec2 staticCoords = qt_TexCoord0;") + | ||||||
| @@ -242,7 +242,7 @@ ShaderEffect { | |||||||
|                 float dst = sin((coords.y + time * 0.001) * distortionFreq); |                 float dst = sin((coords.y + time * 0.001) * distortionFreq); | ||||||
|                 coords.x += dst * distortionScale;" + |                 coords.x += dst * distortionScale;" + | ||||||
|                 (staticNoise ? " |                 (staticNoise ? " | ||||||
|                     noise += distortionScale * 3.0;" : "") |                     noise += distortionScale * 7.0;" : "") | ||||||
|             : "") + |             : "") + | ||||||
|  |  | ||||||
|             (jitter !== 0 || staticNoise !== 0 ? |             (jitter !== 0 || staticNoise !== 0 ? | ||||||
|   | |||||||
| @@ -105,9 +105,9 @@ Item{ | |||||||
|         id: staticLight |         id: staticLight | ||||||
|         property alias source: framesource |         property alias source: framesource | ||||||
|         property alias normals: framesourcenormals |         property alias normals: framesourcenormals | ||||||
|         property real screen_distorsion: appSettings.screenCurvature |         property real screenCurvature: appSettings.screenCurvature | ||||||
|         property size curvature_coefficients: Qt.size(width / mainShader.width, height / mainShader.height) |         property size curvature_coefficients: Qt.size(width / mainShader.width, height / mainShader.height) | ||||||
|         property real ambientLight: appSettings.ambientLight |         property real ambientLight: appSettings.ambientLight * 0.9 + 0.1 | ||||||
|         property color fontColor: appSettings.fontColor |         property color fontColor: appSettings.fontColor | ||||||
|         property color backgroundColor: appSettings.backgroundColor |         property color backgroundColor: appSettings.backgroundColor | ||||||
|         property color reflectionColor: Utils.mix(fontColor, backgroundColor, 0.2) |         property color reflectionColor: Utils.mix(fontColor, backgroundColor, 0.2) | ||||||
| @@ -122,7 +122,7 @@ Item{ | |||||||
|         fragmentShader: " |         fragmentShader: " | ||||||
|             uniform highp sampler2D normals; |             uniform highp sampler2D normals; | ||||||
|             uniform highp sampler2D source; |             uniform highp sampler2D source; | ||||||
|             uniform lowp float screen_distorsion; |             uniform lowp float screenCurvature; | ||||||
|             uniform highp vec2 curvature_coefficients; |             uniform highp vec2 curvature_coefficients; | ||||||
|             uniform lowp float ambientLight; |             uniform lowp float ambientLight; | ||||||
|             uniform highp float qt_Opacity; |             uniform highp float qt_Opacity; | ||||||
| @@ -133,7 +133,7 @@ Item{ | |||||||
|  |  | ||||||
|             vec2 distortCoordinates(vec2 coords){ |             vec2 distortCoordinates(vec2 coords){ | ||||||
|                 vec2 cc = (coords - vec2(0.5)) * curvature_coefficients; |                 vec2 cc = (coords - vec2(0.5)) * curvature_coefficients; | ||||||
|                 float dist = dot(cc, cc) * screen_distorsion; |                 float dist = dot(cc, cc) * screenCurvature; | ||||||
|                 return (coords + cc * (1.0 + dist) * dist); |                 return (coords + cc * (1.0 + dist) * dist); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user