mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 22:54:21 +00:00 
			
		
		
		
	Fix: bloom issues near the edges.
This commit is contained in:
		| @@ -278,6 +278,8 @@ Item{ | |||||||
|             hideSource: true |             hideSource: true | ||||||
|             smooth: false |             smooth: false | ||||||
|             wrapMode: ShaderEffectSource.ClampToEdge |             wrapMode: ShaderEffectSource.ClampToEdge | ||||||
|  |             //sourceRect is needed because FastBlur expands slightly outside the rectangle | ||||||
|  |             sourceRect: Qt.rect(-1, -1, sourceItem.width + 2, sourceItem.height + 2) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -224,12 +224,14 @@ ShaderEffect { | |||||||
|             "finalColor *= texture2D(rasterizationSource, coords).a;" + |             "finalColor *= texture2D(rasterizationSource, coords).a;" + | ||||||
|  |  | ||||||
|             (bloom_strength !== 0 ? |             (bloom_strength !== 0 ? | ||||||
|                 "vec3 bloomColor = texture2D(bloomSource, coords).rgb;" + |                 "vec4 bloomFullColor = texture2D(bloomSource, coords); | ||||||
|  |                  vec3 bloomColor = bloomFullColor.rgb; | ||||||
|  |                  float bloomAlpha = bloomFullColor.a;" + | ||||||
|                 (chroma_color !== 0 ? |                 (chroma_color !== 0 ? | ||||||
|                     "bloomColor = font_color.rgb * mix(vec3(rgb2grey(bloomColor)), bloomColor, chroma_color);" |                     "bloomColor = font_color.rgb * mix(vec3(rgb2grey(bloomColor)), bloomColor, chroma_color);" | ||||||
|                 : |                 : | ||||||
|                     "bloomColor = font_color.rgb * rgb2grey(bloomColor);") + |                     "bloomColor = font_color.rgb * rgb2grey(bloomColor);") + | ||||||
|                 "finalColor += bloomColor * bloom_strength;" |                 "finalColor += bloomColor * bloom_strength * bloomAlpha;" | ||||||
|             : "") + |             : "") + | ||||||
|  |  | ||||||
|             (brightness_flickering !== 0 ? " |             (brightness_flickering !== 0 ? " | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user