mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-31 07:04:20 +00:00 
			
		
		
		
	Fix small issue with burnin masking.
This commit is contained in:
		| @@ -73,7 +73,7 @@ Loader { | ||||
|  | ||||
|             Connections { | ||||
|                 target: kterminalScrollbar | ||||
|                 onOpacityChanged: burnInEffect.restartBlurSource() | ||||
|                 onOpacityChanged: completelyUpdate() | ||||
|             } | ||||
|         } | ||||
|  | ||||
| @@ -118,13 +118,12 @@ Loader { | ||||
|                     vec4 accColor = texture2D(burnInSource, coords); | ||||
|  | ||||
|                     float prevMask = accColor.a; | ||||
|                     float currMask = 1.0 - max3(txtColor); | ||||
|                     float currMask = max3(txtColor); | ||||
|  | ||||
|                     highp float blurDecay = prevMask * clamp((lastUpdate - prevLastUpdate) * burnInTime, 0.0, 1.0); | ||||
|                     highp float blurDecay = clamp((lastUpdate - prevLastUpdate) * burnInTime, 0.0, 1.0); | ||||
|                     blurDecay = max(0.0, blurDecay - prevMask); | ||||
|                     vec3 blurColor = accColor.rgb - vec3(blurDecay); | ||||
|  | ||||
|                     blurColor = clamp(blurColor, vec3(0.0), vec3(1.0)); | ||||
|                     vec3 color = max(blurColor, txtColor * 0.5); | ||||
|                     vec3 color = max(blurColor, txtColor); | ||||
|  | ||||
|                     gl_FragColor = vec4(color, currMask); | ||||
|                 } | ||||
|   | ||||
| @@ -298,7 +298,7 @@ ShaderEffect { | ||||
|             (burnIn !== 0 ? " | ||||
|                 vec4 txt_blur = texture2D(burnInSource, txt_coords); | ||||
|                 float blurDecay = clamp((time - burnInLastUpdate) * burnInTime, 0.0, 1.0); | ||||
|                 txt_color = max(txt_color, txt_blur.rgb - vec3(blurDecay));" | ||||
|                 txt_color = max(txt_color, 0.5 * (txt_blur.rgb - vec3(blurDecay)));" | ||||
|             : "") + | ||||
|  | ||||
|              "txt_color += fontColor.rgb * color;" + | ||||
|   | ||||
		Reference in New Issue
	
	Block a user