Add gamma correction to screen space renderable (SSR) shader, property for SSR and default value gamma = 2.2 for sky browser display copies

This commit is contained in:
Ylva Selling
2022-06-21 10:47:44 -04:00
parent 1511d85d9f
commit d23969b8d3
4 changed files with 21 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ uniform sampler2D tex;
uniform vec3 color = vec3(1.0);
uniform float opacity = 1.0;
uniform vec4 backgroundColor = vec4(0.0);
uniform float gamma = 1.0;
Fragment getFragment() {
Fragment frag;
@@ -44,5 +45,6 @@ Fragment getFragment() {
}
frag.depth = vs_depth;
frag.color.rgb = pow(frag.color.rgb, vec3(1.0/(gamma + 0.000001)));
return frag;
}

View File

@@ -435,6 +435,7 @@ namespace {
"Name = '" + nameBrowser + "',"
"Url = '" + url + "',"
"FaceCamera = false,"
"Gamma = 2.2,"
"CartesianPosition = " + ghoul::to_string(positionBrowser) +
"}";