1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-11-01 15:42:12 +00:00

Burnin is now subtractive. Better looking and more predictable.

This commit is contained in:
Filippo Scognamiglio
2015-01-06 01:35:35 +01:00
parent 17b70b47ce
commit a24cbbcc93
2 changed files with 20 additions and 9 deletions

View File

@@ -26,6 +26,8 @@ ShaderEffect {
property ShaderEffectSource blurredSource
property ShaderEffectSource bloomSource
property real liveBlur: blurredSource && blurredSource.live ? 1.0 : 0.0
property color fontColor: appSettings.fontColor
property color backgroundColor: appSettings.backgroundColor
property real bloom: appSettings.bloom * 2.5
@@ -160,7 +162,8 @@ ShaderEffect {
uniform highp sampler2D bloomSource;
uniform lowp float bloom;" : "") +
(burnIn !== 0 ? "
uniform sampler2D blurredSource;" : "") +
uniform sampler2D blurredSource;
uniform lowp float liveBlur;" : "") +
(staticNoise !== 0 ? "
uniform highp float staticNoise;" : "") +
(((staticNoise !== 0 || jitter !== 0 || rbgShift)
@@ -266,7 +269,7 @@ ShaderEffect {
"vec3 txt_color = texture2D(source, txt_coords).rgb;" +
(burnIn !== 0 ? "
vec4 txt_blur = texture2D(blurredSource, txt_coords);
vec4 txt_blur = liveBlur * texture2D(blurredSource, txt_coords);
txt_color = txt_color + txt_blur.rgb * txt_blur.a;"
: "") +