mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 07:04:20 +00:00 
			
		
		
		
	Remove unused code and fix some indentations.
This commit is contained in:
		| @@ -333,84 +333,10 @@ Item{ | ||||
|         wrapMode: ShaderEffectSource.Repeat | ||||
|         smooth: true | ||||
|         hideSource: true | ||||
|         //format: ShaderEffectSource.Alpha | ||||
|     } | ||||
|  | ||||
|     // RASTERIZATION ////////////////////////////////////////////////////////// | ||||
|  | ||||
| //    ShaderEffect{ | ||||
| //        id: rasterizationContainer | ||||
| //        width: frame.sourceRect.width | ||||
| //        height: frame.sourceRect.height | ||||
| //        property size offset: Qt.size(width - rasterizationEffect.width, height - rasterizationEffect.height) | ||||
| //        property size txtRes: Qt.size(width, height) | ||||
|  | ||||
| //        blending: false | ||||
|  | ||||
| //        fragmentShader: | ||||
| //            "uniform lowp float qt_Opacity; | ||||
| //             uniform highp vec2 offset; | ||||
| //             uniform highp vec2 txtRes;" + | ||||
|  | ||||
| //            "varying highp vec2 qt_TexCoord0;" + | ||||
|  | ||||
| //            "void main() {" + | ||||
| //                "float color = 1.0; | ||||
| //                 color *= smoothstep(0.0, offset.x / txtRes.x, qt_TexCoord0.x); | ||||
| //                 color *= smoothstep(0.0, offset.y / txtRes.y, qt_TexCoord0.y); | ||||
| //                 color *= smoothstep(0.0, offset.x / txtRes.x, 1.0 - qt_TexCoord0.x); | ||||
| //                 color *= smoothstep(0.0, offset.y / txtRes.y, 1.0 - qt_TexCoord0.y);" + | ||||
|  | ||||
| //                "float distance = length(vec2(0.5) - qt_TexCoord0);" + | ||||
| //                "color = mix(color, 0.0, 1.2 * distance * distance);" + | ||||
|  | ||||
| //                "gl_FragColor.a = color;" + | ||||
| //            "}" | ||||
|  | ||||
| //        ShaderEffect { | ||||
| //            id: rasterizationEffect | ||||
| //            width: terminalContainer.width | ||||
| //            height: terminalContainer.height | ||||
| //            anchors.centerIn: parent | ||||
| //            property size virtual_resolution: Qt.size(kterminal.width, kterminal.height) | ||||
|  | ||||
| //            blending: false | ||||
|  | ||||
| //            fragmentShader: | ||||
| //                "uniform lowp float qt_Opacity;" + | ||||
|  | ||||
| //                "varying highp vec2 qt_TexCoord0; | ||||
| //                     uniform highp vec2 virtual_resolution; | ||||
|  | ||||
| //                     float getScanlineIntensity(vec2 coords) { | ||||
| //                        float result = 1.0;" + | ||||
| //                        (mScanlines != shadersettings.no_rasterization ? | ||||
| //                            "result *= abs(sin(coords.y * virtual_resolution.y * "+Math.PI+"));" : "") + | ||||
| //                        (mScanlines == shadersettings.pixel_rasterization ? | ||||
| //                            "result *= abs(sin(coords.x * virtual_resolution.x * "+Math.PI+"));" : "") + " | ||||
| //                        return result; | ||||
| //                     }" + | ||||
|  | ||||
| //            "void main() {" + | ||||
| //                "float color = getScanlineIntensity(qt_TexCoord0);" + | ||||
|  | ||||
| //                "float distance = length(vec2(0.5) - qt_TexCoord0);" + | ||||
| //                "color = mix(color, 0.0, 1.2 * distance * distance);" + | ||||
|  | ||||
| //                "gl_FragColor.a = color;" + | ||||
| //            "}" | ||||
|  | ||||
| //            onStatusChanged: if (log) console.log(log) //Print warning messages | ||||
| //        } | ||||
| //        onStatusChanged: if (log) console.log(log) //Print warning messages | ||||
| //    } | ||||
| //    ShaderEffectSource{ | ||||
| //        id: rasterizationEffectSource | ||||
| //        sourceItem: rasterizationContainer | ||||
| //        hideSource: true | ||||
| //        smooth: true | ||||
| //        //format: ShaderEffectSource.Alpha | ||||
| //    } | ||||
|     ShaderEffect { | ||||
|         id: rasterizationEffect | ||||
|         width: parent.width | ||||
| @@ -423,25 +349,27 @@ Item{ | ||||
|             "uniform lowp float qt_Opacity;" + | ||||
|  | ||||
|             "varying highp vec2 qt_TexCoord0; | ||||
|                  uniform highp vec2 virtual_resolution; | ||||
|              uniform highp vec2 virtual_resolution; | ||||
|  | ||||
|                  highp float getScanlineIntensity(vec2 coords) { | ||||
|                     highp float result = 1.0;" + | ||||
|                     (mScanlines != shadersettings.no_rasterization ? | ||||
|                         "result *= abs(sin(coords.y * virtual_resolution.y * "+Math.PI+"));" : "") + | ||||
|                     (mScanlines == shadersettings.pixel_rasterization ? | ||||
|                         "result *= abs(sin(coords.x * virtual_resolution.x * "+Math.PI+"));" : "") + " | ||||
|                     return result; | ||||
|                  }" + | ||||
|              highp float getScanlineIntensity(vec2 coords) { | ||||
|                  highp float result = 1.0;" + | ||||
|  | ||||
|         "void main() {" + | ||||
|             "highp float color = getScanlineIntensity(qt_TexCoord0);" + | ||||
|                 (mScanlines != shadersettings.no_rasterization ? | ||||
|                     "result *= abs(sin(coords.y * virtual_resolution.y * "+Math.PI+"));" : "") + | ||||
|                 (mScanlines == shadersettings.pixel_rasterization ? | ||||
|                     "result *= abs(sin(coords.x * virtual_resolution.x * "+Math.PI+"));" : "") + " | ||||
|  | ||||
|             "float distance = length(vec2(0.5) - qt_TexCoord0);" + | ||||
|             "color = mix(color, 0.0, 1.2 * distance * distance);" + | ||||
|                 return result; | ||||
|              }" + | ||||
|  | ||||
|             "gl_FragColor.a = color;" + | ||||
|         "}" | ||||
|             "void main() {" + | ||||
|                 "highp float color = getScanlineIntensity(qt_TexCoord0);" + | ||||
|  | ||||
|                 "float distance = length(vec2(0.5) - qt_TexCoord0);" + | ||||
|                 "color = mix(color, 0.0, 1.2 * distance * distance);" + | ||||
|  | ||||
|                 "gl_FragColor.a = color;" + | ||||
|             "}" | ||||
|  | ||||
|         onStatusChanged: if (log) console.log(log) //Print warning messages | ||||
|     } | ||||
|   | ||||
| @@ -175,10 +175,6 @@ ShaderEffect { | ||||
|             :" | ||||
|                 vec2 coords = qt_TexCoord0;") + | ||||
|  | ||||
| //            (frameReflections ? " | ||||
| //                vec2 inside = step(0.0, coords) - step(1.0, coords); | ||||
| //                coords = abs(mod(floor(coords), 2.0) - fract(coords)) * clamp(inside.x + inside.y, 0.0, 1.0);" : "") + | ||||
|  | ||||
|             (horizontal_sincronization !== 0 ? " | ||||
|                 float h_distortion = 0.5 * sin(time*0.001 + coords.y*10.0*fract(time/10.0)); | ||||
|                 h_distortion += 0.5 * cos(time*0.04 + 0.03 + coords.y*50.0*fract(time/10.0 + 0.4)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user