mirror of https://github.com/Leinnan/doppler.git
Gamma correction
This commit is contained in:
parent
ff87ee4204
commit
de94391295
File diff suppressed because it is too large
Load Diff
|
|
@ -24,5 +24,6 @@ void main()
|
||||||
|
|
||||||
vec3 tc = texture(screenTexture, coord).rgb;
|
vec3 tc = texture(screenTexture, coord).rgb;
|
||||||
|
|
||||||
FragColor = vec4(tc,1.0) * vig;
|
float gamma = 2.2;
|
||||||
|
FragColor = vec4(pow(tc, vec3(1.0/gamma)),1.0) * vig;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ impl Default for PointLight {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PointLight {
|
PointLight {
|
||||||
pos: vec3(0.0, 0.0, 0.0),
|
pos: vec3(0.0, 0.0, 0.0),
|
||||||
ambient: vec3(0.05, 0.05, 0.05),
|
ambient: vec3(0.00, 0.00, 0.00),
|
||||||
diffuse: vec3(0.8, 0.8, 0.8),
|
diffuse: vec3(0.8, 0.8, 0.8),
|
||||||
specular: vec3(1.0, 1.0, 1.0),
|
specular: vec3(1.0, 1.0, 1.0),
|
||||||
constant: 1.0,
|
constant: 1.0,
|
||||||
|
|
@ -100,7 +100,7 @@ impl Default for DirectionalLight {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
DirectionalLight {
|
DirectionalLight {
|
||||||
direction: vec3(-0.3, -1.0, -0.3),
|
direction: vec3(-0.3, -1.0, -0.3),
|
||||||
ambient: vec3(0.14, 0.14, 0.14),
|
ambient: vec3(0.05, 0.05, 0.05),
|
||||||
diffuse: vec3(0.4, 0.4, 0.4),
|
diffuse: vec3(0.4, 0.4, 0.4),
|
||||||
specular: vec3(0.5, 0.5, 0.5),
|
specular: vec3(0.5, 0.5, 0.5),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue