mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 19:29:04 -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user