mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 07:04:20 +00:00 
			
		
		
		
	Use already available shaderEffectSource and improve bloom look at low quality by limiting minimum radius.
This commit is contained in:
		| @@ -1,6 +1,8 @@ | ||||
| import QtQuick 2.2 | ||||
| import QtGraphicalEffects 1.0 | ||||
|  | ||||
| import "utils.js" as Utils | ||||
|  | ||||
| ShaderTerminal{ | ||||
|     property alias title: terminal.title | ||||
|     property alias terminalSize: terminal.terminalSize | ||||
| @@ -45,9 +47,10 @@ ShaderTerminal{ | ||||
|         asynchronous: true | ||||
|         width: parent.width * appSettings.bloomQuality | ||||
|         height: parent.height * appSettings.bloomQuality | ||||
|  | ||||
|         sourceComponent: FastBlur{ | ||||
|             radius: 48 * appSettings.bloomQuality * appSettings.windowScaling | ||||
|             source: terminal.mainTerminal | ||||
|             radius: Utils.lint(16, 48, appSettings.bloomQuality * appSettings.windowScaling); | ||||
|             source: terminal.mainSource | ||||
|             transparentBorder: true | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -83,7 +83,7 @@ Item{ | ||||
|         sourceComponent: FastBlur{ | ||||
|             id: frameReflectionEffect | ||||
|             radius: 128 | ||||
|             source: terminal.kterminal | ||||
|             source: terminal.mainSource | ||||
|             smooth: false | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -1,5 +1,8 @@ | ||||
| .pragma library | ||||
|  | ||||
| function lint(a, b, t) { | ||||
|     return (1 - t) * a + (t) * b; | ||||
| } | ||||
| function mix(c1, c2, alpha){ | ||||
|     return Qt.rgba(c1.r * alpha + c2.r * (1-alpha), | ||||
|                    c1.g * alpha + c2.g * (1-alpha), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user