mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 22:54:21 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/firemark/cool-old-term into colorssupport
This commit is contained in:
		| @@ -68,6 +68,9 @@ Item{ | ||||
|     property real motion_blur: 0.40 | ||||
|     property real bloom_strength: 0.65 | ||||
|  | ||||
|     property real chroma_color: 0.0 | ||||
|     property real saturation_color: 0.0 | ||||
|  | ||||
|     property real jitter: 0.18 | ||||
|  | ||||
|     property real horizontal_sincronization: 0.08 | ||||
| @@ -173,6 +176,8 @@ Item{ | ||||
|             brightness_flickering: brightness_flickering, | ||||
|             horizontal_sincronization: horizontal_sincronization, | ||||
|             noise_strength: noise_strength, | ||||
|             chroma_color: chroma_color, | ||||
|             saturation_color: saturation_color, | ||||
|             screen_distortion: screen_distortion, | ||||
|             glowing_line_strength: glowing_line_strength, | ||||
|             frames_index: frames_index, | ||||
| @@ -238,6 +243,8 @@ Item{ | ||||
|         horizontal_sincronization = settings.horizontal_sincronization !== undefined ? settings.horizontal_sincronization : horizontal_sincronization | ||||
|         brightness_flickering = settings.brightness_flickering !== undefined ? settings.brightness_flickering : brightness_flickering; | ||||
|         noise_strength = settings.noise_strength !== undefined ? settings.noise_strength : noise_strength; | ||||
|         chroma_color = settings.chroma_color !== undefined ? settings.chroma_color : chroma_color; | ||||
|         saturation_color = settings.saturation_color !== undefined ? settings.saturation_color : saturation_color; | ||||
|         screen_distortion = settings.screen_distortion !== undefined ? settings.screen_distortion : screen_distortion; | ||||
|         glowing_line_strength = settings.glowing_line_strength !== undefined ? settings.glowing_line_strength : glowing_line_strength; | ||||
|  | ||||
| @@ -307,42 +314,42 @@ Item{ | ||||
|         id: profileslist | ||||
|         ListElement{ | ||||
|             text: "Default Amber" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.65,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#ff8100","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.08,"jitter":0.18,"motion_blur":0.4,"noise_strength":0.1,"rasterization":0,"screen_distortion":0.1,"windowOpacity":1}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.65,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#ff8100","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.08,"jitter":0.18,"motion_blur":0.4,"noise_strength":0.1,"rasterization":0,"screen_distortion":0.1,"windowOpacity":1,"chroma_color":0,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|         ListElement{ | ||||
|             text: "Default Green" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#0ccc68","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.08,"jitter":0.18,"motion_blur":0.45,"noise_strength":0.1,"rasterization":0,"screen_distortion":0.1,"windowOpacity":1}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#0ccc68","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.08,"jitter":0.18,"motion_blur":0.45,"noise_strength":0.1,"rasterization":0,"screen_distortion":0.1,"windowOpacity":1,"chroma_color":0,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|         ListElement{ | ||||
|             text: "Default Scanlines" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#00ff5b","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.07,"jitter":0.11,"motion_blur":0.4,"noise_strength":0.05,"rasterization":1,"screen_distortion":0.1,"windowOpacity":1}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#00ff5b","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.07,"jitter":0.11,"motion_blur":0.4,"noise_strength":0.05,"rasterization":1,"screen_distortion":0.1,"windowOpacity":1,"chroma_color":0,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|         ListElement{ | ||||
|             text: "Default Pixelated" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#ff8100","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.1,"jitter":0,"motion_blur":0.45,"noise_strength":0.14,"rasterization":2,"screen_distortion":0.05,"windowOpacity":1}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.1,"contrast":0.85,"fontIndex":0,"font_color":"#ff8100","frames_index":1,"glowing_line_strength":0.2,"horizontal_sincronization":0.1,"jitter":0,"motion_blur":0.45,"noise_strength":0.14,"rasterization":2,"screen_distortion":0.05,"windowOpacity":1,"chroma_color":0,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|         ListElement{ | ||||
|             text: "Apple ][" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.5,"brightness":0.5,"brightness_flickering":0.2,"contrast":0.85,"fontIndex":2,"font_color":"#2fff91","frames_index":1,"glowing_line_strength":0.22,"horizontal_sincronization":0.08,"jitter":0.1,"motion_blur":0.65,"noise_strength":0.08,"rasterization":1,"screen_distortion":0.18,"windowOpacity":1}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.5,"brightness":0.5,"brightness_flickering":0.2,"contrast":0.85,"fontIndex":2,"font_color":"#2fff91","frames_index":1,"glowing_line_strength":0.22,"horizontal_sincronization":0.08,"jitter":0.1,"motion_blur":0.65,"noise_strength":0.08,"rasterization":1,"screen_distortion":0.18,"windowOpacity":1,"chroma_color":0,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|         ListElement{ | ||||
|             text: "Vintage" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.54,"contrast":0.85,"fontIndex":0,"font_color":"#00ff3e","frames_index":2,"glowing_line_strength":0.3,"horizontal_sincronization":0.2,"jitter":0.4,"motion_blur":0.75,"noise_strength":0.2,"rasterization":1,"screen_distortion":0.1,"windowOpacity":1}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.54,"contrast":0.85,"fontIndex":0,"font_color":"#00ff3e","frames_index":2,"glowing_line_strength":0.3,"horizontal_sincronization":0.2,"jitter":0.4,"motion_blur":0.75,"noise_strength":0.2,"rasterization":1,"screen_distortion":0.1,"windowOpacity":1,"chroma_color":0,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|         ListElement{ | ||||
|             text: "IBM Dos" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.07,"contrast":0.85,"fontIndex":7,"font_color":"#ffffff","frames_index":1,"glowing_line_strength":0.13,"horizontal_sincronization":0,"jitter":0.08,"motion_blur":0.3,"noise_strength":0.03,"rasterization":0,"screen_distortion":0.1,"windowOpacity":1}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4,"brightness":0.5,"brightness_flickering":0.07,"contrast":0.85,"fontIndex":7,"font_color":"#ffffff","frames_index":1,"glowing_line_strength":0.13,"horizontal_sincronization":0,"jitter":0.08,"motion_blur":0.3,"noise_strength":0.03,"rasterization":0,"screen_distortion":0.1,"windowOpacity":1,"chroma_color":1,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|         ListElement{ | ||||
|             text: "Transparent Green" | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4549689440993788,"brightness":0.5,"brightness_flickering":0.20341614906832298,"contrast":0.85,"fontIndex":0,"font_color":"#0ccc68","frames_index":0,"glowing_line_strength":0.15993788819875776,"horizontal_sincronization":0.05045871559633028,"jitter":0.20341614906832298,"motion_blur":0.24999999999999997,"noise_strength":0.20031055900621117,"rasterization":0,"screen_distortion":0.05045871559633028,"windowOpacity":0.5956221198156681}' | ||||
|             obj_string: '{"ambient_light":0.2,"background_color":"#000000","bloom_strength":0.4549689440993788,"brightness":0.5,"brightness_flickering":0.20341614906832298,"contrast":0.85,"fontIndex":0,"font_color":"#0ccc68","frames_index":0,"glowing_line_strength":0.15993788819875776,"horizontal_sincronization":0.05045871559633028,"jitter":0.20341614906832298,"motion_blur":0.24999999999999997,"noise_strength":0.20031055900621117,"rasterization":0,"screen_distortion":0.05045871559633028,"windowOpacity":0.5956221198156681,"chroma_color":0,"saturation_color":0}' | ||||
|             builtin: true | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -263,7 +263,8 @@ Item{ | ||||
|                 : "") + | ||||
|  | ||||
|  | ||||
|                 "gl_FragColor.a = floor(color) / 256.0;" + | ||||
|                 "gl_FragColor = texture2D(source, coords);" + | ||||
|                 "gl_FragColor.a = color / 256.0;" +  | ||||
|             "}" | ||||
|  | ||||
|         onStatusChanged: if (log) console.log(log) //Print warning messages | ||||
|   | ||||
| @@ -92,21 +92,35 @@ Tab{ | ||||
|         GroupBox{ | ||||
|             title: qsTr("Colors") | ||||
|             Layout.fillWidth: true | ||||
|             RowLayout{ | ||||
|                 anchors.fill: parent | ||||
|                 ColorButton{ | ||||
|                     name: qsTr("Font") | ||||
|                     height: 50 | ||||
|                     Layout.fillWidth: true | ||||
|                     onColorSelected: shadersettings._font_color = color; | ||||
|                     button_color: shadersettings._font_color | ||||
|             ColumnLayout{ | ||||
|                 RowLayout{ | ||||
|                     anchors.fill: parent | ||||
|                     ColorButton{ | ||||
|                         name: qsTr("Font") | ||||
|                         height: 50 | ||||
|                         Layout.fillWidth: true | ||||
|                         onColorSelected: shadersettings._font_color = color; | ||||
|                         button_color: shadersettings._font_color | ||||
|                     } | ||||
|                     ColorButton{ | ||||
|                         name: qsTr("Background") | ||||
|                         height: 50 | ||||
|                         Layout.fillWidth: true | ||||
|                         onColorSelected: shadersettings._background_color = color; | ||||
|                         button_color: shadersettings._background_color | ||||
|                     } | ||||
|                 } | ||||
|                 ColorButton{ | ||||
|                     name: qsTr("Background") | ||||
|                     height: 50 | ||||
|                     Layout.fillWidth: true | ||||
|                     onColorSelected: shadersettings._background_color = color; | ||||
|                     button_color: shadersettings._background_color | ||||
|                 ColumnLayout{ | ||||
|                     CheckableSlider{ | ||||
|                         name: qsTr("Chroma Color") | ||||
|                         onValueChanged: shadersettings.chroma_color = value | ||||
|                         _value: shadersettings.chroma_color | ||||
|                     } | ||||
|                     CheckableSlider{ | ||||
|                         name: qsTr("Saturation Color") | ||||
|                         onValueChanged: shadersettings.saturation_color = value | ||||
|                         _value: shadersettings.saturation_color | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|   | ||||
| @@ -39,6 +39,9 @@ ShaderEffect { | ||||
|     property real screen_distorsion: shadersettings.screen_distortion | ||||
|     property real glowing_line_strength: shadersettings.glowing_line_strength | ||||
|  | ||||
|     property real chroma_color: shadersettings.chroma_color; | ||||
|     property real saturation_color: shadersettings.saturation_color; | ||||
|  | ||||
|     property real brightness_flickering: shadersettings.brightness_flickering | ||||
|     property real horizontal_sincronization: shadersettings.horizontal_sincronization | ||||
|  | ||||
| @@ -175,7 +178,7 @@ ShaderEffect { | ||||
|                 vec2 txt_coords = coords + offset * "+str(jitter)+";" | ||||
|             :  "vec2 txt_coords = coords;") + | ||||
|  | ||||
|             "float color = texture2D(source, txt_coords).a;" + | ||||
|             "float color = 0.0;" + | ||||
|  | ||||
|             (noise_strength !== 0 ? " | ||||
|                 float noiseVal = texture2D(noiseSource, qt_TexCoord0 + vec2(fract(time / 51.0), fract(time / 237.0))).a; | ||||
| @@ -184,17 +187,31 @@ ShaderEffect { | ||||
|             (glowing_line_strength !== 0 ? " | ||||
|                 color += randomPass(coords) * glowing_line_strength;" : "") + | ||||
|  | ||||
|             "vec3 finalColor = mix(background_color, font_color, color).rgb;" + | ||||
|             (chroma_color !== 0 ?  | ||||
|                 "vec4 realBackColor = texture2D(source, txt_coords);" + | ||||
|                 (saturation_color !== 0 ? | ||||
|                     "vec4 satured_font_color = mix(font_color, vec4(1) , "+ str(saturation_color) + ");" + | ||||
|                     "vec4 mixedColor = mix(font_color, realBackColor * satured_font_color, "+ str(chroma_color) +");": | ||||
|                     "vec4 mixedColor = mix(font_color, realBackColor * font_color, "+ str(chroma_color) +");" | ||||
|                 ) +  | ||||
|                  | ||||
|                 "vec4 finalBackColor = mix(background_color, mixedColor, realBackColor.a);" + | ||||
|                 "vec3 finalColor = mix(finalBackColor, font_color, color).rgb;" : | ||||
|                 "color += texture2D(source, txt_coords).a;" + | ||||
|                 "vec3 finalColor = mix(background_color, font_color, color).rgb;" | ||||
|             ) + | ||||
|  | ||||
|             "finalColor *= texture2D(rasterizationSource, coords).a;" + | ||||
|  | ||||
|             (bloom !== 0 ? " | ||||
|                 finalColor += font_color.rgb * texture2D(bloomSource, coords).r *" + str(bloom) + ";" : "") + | ||||
|                 finalColor += font_color.rgb *" +  | ||||
|                 "dot(texture2D(bloomSource, coords).rgb, vec3(0.299, 0.587, 0.114)) *" + str(bloom) + ";" : "") + | ||||
|  | ||||
|             (brightness_flickering !== 0 ? " | ||||
|                 finalColor *= brightness;" : "") + | ||||
|  | ||||
|             "gl_FragColor = vec4(finalColor *"+str(brightness)+", qt_Opacity); | ||||
|         }" | ||||
|             "gl_FragColor = vec4(finalColor *"+str(brightness)+", qt_Opacity);" + | ||||
|         "}" | ||||
|  | ||||
|      onStatusChanged: if (log) console.log(log) //Print warning messages | ||||
| } | ||||
|   | ||||
| @@ -36,22 +36,23 @@ color 1 0 0 0 1 0 # regular background color (Black) | ||||
|  | ||||
| color 2 0 0 0 0 0 # regular color 0 Black | ||||
|  | ||||
| color 3 59 59 59 0 0 # regular color 1 Red | ||||
| color 3 255 43 43 0 0 # regular color 1 Red | ||||
|  | ||||
| color 4 137 137 137 0 0 # regular color 2 Green | ||||
| color 4 0 28 172 120 0 0 # regular color 2 Green | ||||
|  | ||||
| color 5 116 116 116 0 0 # regular color 3 Yellow | ||||
| color 5 248 213 104 0 0 # regular color 3 Yellow | ||||
|  | ||||
| color 6 39 39 39 0 0 # regular color 4 Blue | ||||
| color 6 0 43 108 196 # regular color 4 Blue | ||||
|  | ||||
| color 7 70 70 70 0 0 # regular color 5 Magenta | ||||
| color 7 255 29 206 0 0 # regular color 5 Magenta | ||||
|  | ||||
| color 8 148 148 148 0 0 # regular color 6 Cyan | ||||
| color 8 24 167 181 0 0 # regular color 6 Cyan | ||||
|  | ||||
| color 9 179 179 179 0 0 # regular color 7 White | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| # intensive colors | ||||
|  | ||||
|  | ||||
| @@ -68,17 +69,17 @@ color 11 0 0 0 1 0 # intensive background color | ||||
|  | ||||
| color 12 106 106 106 0 0 # intensive color 0 | ||||
|  | ||||
| color 13 122 122 122 0 0 # intensive color 1 | ||||
| color 13 253 94 83 0 0 # intensive color 1 | ||||
|  | ||||
| color 14 207 207 207 0 0 # intensive color 2 | ||||
| color 14 168 228 160 0 0 # intensive color 2 | ||||
|  | ||||
| color 15 243 243 243 0 0 # intensive color 3 | ||||
| color 15 254 254 34 0 0 # intensive color 3 | ||||
|  | ||||
| color 16 99 99 99 0 0 # intensive color 4 | ||||
| color 16 154 206 235 0 0 # intensive color 4 | ||||
|  | ||||
| color 17 134 134 134 0 0 # intensive color 5 | ||||
| color 17 252 116 253 0 0 # intensive color 5 | ||||
|  | ||||
| color 18 219 219 219 0 0 # intensive color 6 | ||||
| color 18 236 234 190 0 0 # intensive color 6 | ||||
|  | ||||
| color 19 255 255 255 0 0 # intensive color 7 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user