Enable more control of bloom using hdr

This commit is contained in:
jgk
2021-08-20 15:06:55 +02:00
parent 822c65e0cc
commit 778d18276b
6 changed files with 24 additions and 22 deletions
+2 -4
View File
@@ -41,10 +41,8 @@ void main()
{
sumFive += vec4(texture(screenTexture, vTexPos + fiveOff[i]));
}
// divinding by 4 is not ideal, because it adds extra alpha
// but has more juice than dividing by 5
fColor = max(texture(screenTexture,vTexPos), sumFive / 4);
//fColor = sumFive / 4;
//fColor = max(texture(screenTexture,vTexPos), sumFive / 5);
fColor = vec4 ( (sumFive / 5).rgb, max((sumFive/5).a,texture(screenTexture,vTexPos).a) );
// vec4 sampleTex[9];
// for(int i=0; i<9; i++)
// {