Skip to content

Commit

Permalink
Revert "Change burnin masking function to max. Should preseve darker …
Browse files Browse the repository at this point in the history
…colors."

This reverts commit 3cee186.
  • Loading branch information
Swordfish90 committed Dec 18, 2018
1 parent dcb7b7c commit c85eba6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/qml/BurnInEffect.qml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ Loader {
uniform highp float prevLastUpdate;" +

"float max3(vec3 v) {
return max(v.x, max(v.y, v.z));
"float rgb2grey(vec3 v){
return dot(v, vec3(0.21, 0.72, 0.04));
}" +

"void main() {
Expand All @@ -119,7 +119,7 @@ Loader {
vec4 accColor = texture2D(burnInSource, coords);
float prevMask = accColor.a;
float currMask = max3(txtColor);
float currMask = rgb2grey(txtColor);
highp float blurDecay = clamp((lastUpdate - prevLastUpdate) * burnInTime, 0.0, 1.0);
blurDecay = max(0.0, blurDecay - prevMask);
Expand Down

0 comments on commit c85eba6

Please sign in to comment.