Experiment with bloom

This commit is contained in:
2021-07-05 19:39:34 +02:00
parent 2d94e50e3a
commit 77d93fabeb
6 changed files with 93 additions and 10 deletions
+6 -2
View File
@@ -19,7 +19,10 @@ const vec2 off[9] = vec2[](
, vec2( -vOff,0.0 )
, vec2( -vOff,-hOff )
);
vec4 combinef (vec4 ac, vec4 bc)
//{ return vec4 (max(ac.x,bc.x),max(ac.y,bc.y),max(ac.z,bc.z),max(ac.w,bc.w));
{ return vec4 (max(ac.x,bc.x),max(ac.y,bc.y),max(ac.z,bc.z),ac.w +bc.w*frac);
}
void main()
{
vec4 sampleTex[9];
@@ -29,6 +32,7 @@ void main()
}
vec4 col = vec4(0,0,0,0);
for (int i = 0; i < 9; i++)
col += sampleTex[i] * frac;
col = combinef(col,sampleTex[i]);
//col += sampleTex[i] * frac;
fColor = col;
}