1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-11-04 00:52:11 +00:00

Slight improvements to burnin and rgb shift effects.

This commit is contained in:
Filippo Scognamiglio
2018-10-22 23:30:17 +02:00
parent e4c014c1a8
commit c091a90cea
2 changed files with 13 additions and 11 deletions

View File

@@ -329,8 +329,8 @@ Item{
uniform lowp sampler2D blurredSource;
uniform highp float blurCoefficient;" +
"float rgb2grey(vec3 v){
return dot(v, vec3(0.21, 0.72, 0.04));
"float max3(vec3 v) {
return max (max (v.x, v.y), v.z);
}" +
"void main() {" +
@@ -339,7 +339,7 @@ Item{
"vec3 blur_color = texture2D(blurredSource, coords).rgb - vec3(blurCoefficient);" +
"vec3 color = min(origColor + blur_color, max(origColor, blur_color));" +
"gl_FragColor = vec4(color, rgb2grey(color - origColor));" +
"gl_FragColor = vec4(color, max3(color - origColor));" +
"}"
onStatusChanged: if (log) console.log(log) //Print warning messages