mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 07:04:20 +00:00 
			
		
		
		
	Limit screen curvature effect.
This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user