mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-22 12:58:39 +00:00
Real fix to bloom borders issues. Using Connections to update main source instead of live: true.
This commit is contained in:
parent
1be7987abe
commit
19f6d85243
@ -171,6 +171,17 @@ Item{
|
|||||||
hideSource: true
|
hideSource: true
|
||||||
smooth: mScanlines == shadersettings.no_rasterization
|
smooth: mScanlines == shadersettings.no_rasterization
|
||||||
wrapMode: ShaderEffectSource.ClampToEdge
|
wrapMode: ShaderEffectSource.ClampToEdge
|
||||||
|
live: false
|
||||||
|
|
||||||
|
signal sourceUpdate
|
||||||
|
|
||||||
|
Connections{
|
||||||
|
target: kterminal
|
||||||
|
onUpdatedImage:{
|
||||||
|
kterminalSource.scheduleUpdate();
|
||||||
|
kterminalSource.sourceUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loader{
|
Loader{
|
||||||
id: blurredSourceLoader
|
id: blurredSourceLoader
|
||||||
@ -199,7 +210,6 @@ Item{
|
|||||||
timeBinding.target = null
|
timeBinding.target = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections{
|
Connections{
|
||||||
id: timeBinding
|
id: timeBinding
|
||||||
target: timeManager
|
target: timeManager
|
||||||
@ -207,10 +217,9 @@ Item{
|
|||||||
_blurredSourceEffect.scheduleUpdate();
|
_blurredSourceEffect.scheduleUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections{
|
Connections{
|
||||||
target: kterminal
|
target: kterminalSource
|
||||||
onUpdatedImage:{
|
onSourceUpdate:{
|
||||||
livetimer.restart();
|
livetimer.restart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,9 +289,6 @@ Item{
|
|||||||
sourceItem: bloomEffectLoader.item
|
sourceItem: bloomEffectLoader.item
|
||||||
hideSource: true
|
hideSource: true
|
||||||
smooth: false
|
smooth: false
|
||||||
wrapMode: ShaderEffectSource.ClampToEdge
|
|
||||||
//sourceRect is needed because FastBlur expands slightly outside the rectangle
|
|
||||||
sourceRect: Qt.rect(-1, -1, sourceItem.width + 2, sourceItem.height + 2)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +222,9 @@ ShaderEffect {
|
|||||||
(bloom_strength !== 0 ?
|
(bloom_strength !== 0 ?
|
||||||
"vec4 bloomFullColor = texture2D(bloomSource, coords);
|
"vec4 bloomFullColor = texture2D(bloomSource, coords);
|
||||||
vec3 bloomColor = bloomFullColor.rgb;
|
vec3 bloomColor = bloomFullColor.rgb;
|
||||||
float bloomAlpha = bloomFullColor.a;" +
|
vec2 minBound = step(vec2(0.0), coords);
|
||||||
|
vec2 maxBound = step(coords, vec2(1.0));
|
||||||
|
float bloomAlpha = bloomFullColor.a * minBound.x * minBound.y * maxBound.x * maxBound.y;" +
|
||||||
(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);"
|
||||||
:
|
:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user