mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-18 20:20:45 +00:00
Fix a couple of issues with burnIn.
This commit is contained in:
parent
cc7c13e17f
commit
82f2bd6231
@ -25,9 +25,9 @@ Loader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function restartBlurSource(){
|
function restartBlurSource(){
|
||||||
prevLastUpdate = 0;
|
prevLastUpdate = timeManager.time;
|
||||||
lastUpdate = 0;
|
lastUpdate = prevLastUpdate;
|
||||||
completelyUpdate()
|
completelyUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
@ -56,6 +56,10 @@ Loader {
|
|||||||
|
|
||||||
format: ShaderEffectSource.RGBA
|
format: ShaderEffectSource.RGBA
|
||||||
|
|
||||||
|
// Enabling smooth with a low burnInQuality causes bad artifacts because the FBO
|
||||||
|
// has different values when it's read back. This lowers the quality, but makes it more consistent.
|
||||||
|
smooth: appSettings.burnInQuality === 1.0
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
@ -310,7 +310,7 @@ ShaderEffect {
|
|||||||
" : "") +
|
" : "") +
|
||||||
|
|
||||||
(burnIn !== 0 ? "
|
(burnIn !== 0 ? "
|
||||||
vec4 txt_blur = texture2D(burnInSource, txt_coords);
|
vec4 txt_blur = texture2D(burnInSource, staticCoords);
|
||||||
float blurDecay = clamp((time - burnInLastUpdate) * burnInTime, 0.0, 1.0);
|
float blurDecay = clamp((time - burnInLastUpdate) * burnInTime, 0.0, 1.0);
|
||||||
txt_color = max(txt_color, 0.5 * (txt_blur.rgb - vec3(blurDecay)));"
|
txt_color = max(txt_color, 0.5 * (txt_blur.rgb - vec3(blurDecay)));"
|
||||||
: "") +
|
: "") +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user