mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-13 08:58:54 -05:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -435,6 +435,7 @@ namespace {
|
||||
"Name = '" + nameBrowser + "',"
|
||||
"Url = '" + url + "',"
|
||||
"FaceCamera = false,"
|
||||
"Gamma = 2.2,"
|
||||
"CartesianPosition = " + ghoul::to_string(positionBrowser) +
|
||||
"}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user