Skip to content

Commit

Permalink
Gloom: Slight adjustment to frame brightness evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent de961bc commit 7a2f391
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -5,7 +5,7 @@ uniform sampler2D uBrightnessSamples;

float Gloom_Exposure(void) {
ivec2 sampleSize = textureSize(uBrightnessSamples, 0);
vec3 channelWeights = vec3(1.0 / 3.0);
vec3 channelWeights = vec3(0.2125, 0.7154, 0.0721);
float brightest = 0.0;
for (int x = 0; x < sampleSize.x; ++x) {
for (int y = 0; y < sampleSize.y; ++y) {
Expand Down
Expand Up @@ -9,7 +9,7 @@ void main(void) {
// Gather highly averaged colors for brightness analysis.
// The rendering target is very small for these fragments.
// Sample values are blended with colors from previous frames.
float alpha = 1.0 / uCurrentFrameRate; // TODO: Adjust based on FPS.
out_FragColor.rgb = texture(uFramebuf, vUV, -1.5).rgb;
out_FragColor.a = alpha;
float alpha = 2.0 / uCurrentFrameRate; // TODO: Adjust based on FPS.
out_FragColor.rgb = texture(uFramebuf, vUV, -1.0).rgb;
out_FragColor.a = min(1.0, alpha);
}

0 comments on commit 7a2f391

Please sign in to comment.