mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-31 10:11:20 +00:00
Change mask value to use greyscale color instead of max channel.
This commit is contained in:
parent
af8edc72f4
commit
9df470acfc
@ -107,8 +107,8 @@ Loader {
|
|||||||
|
|
||||||
uniform highp float prevLastUpdate;" +
|
uniform highp float prevLastUpdate;" +
|
||||||
|
|
||||||
"float max3(vec3 v) {
|
"float rgb2grey(vec3 v){
|
||||||
return max (max (v.x, v.y), v.z);
|
return dot(v, vec3(0.21, 0.72, 0.04));
|
||||||
}" +
|
}" +
|
||||||
|
|
||||||
"void main() {
|
"void main() {
|
||||||
@ -118,7 +118,7 @@ Loader {
|
|||||||
vec4 accColor = texture2D(burnInSource, coords);
|
vec4 accColor = texture2D(burnInSource, coords);
|
||||||
|
|
||||||
float prevMask = accColor.a;
|
float prevMask = accColor.a;
|
||||||
float currMask = max3(txtColor);
|
float currMask = rgb2grey(txtColor);
|
||||||
|
|
||||||
highp float blurDecay = clamp((lastUpdate - prevLastUpdate) * burnInTime, 0.0, 1.0);
|
highp float blurDecay = clamp((lastUpdate - prevLastUpdate) * burnInTime, 0.0, 1.0);
|
||||||
blurDecay = max(0.0, blurDecay - prevMask);
|
blurDecay = max(0.0, blurDecay - prevMask);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user