Use a less intrusive delta value
This commit is contained in:
parent
43df357cfb
commit
d7e3976ef5
@ -3,7 +3,7 @@ uniform sampler2D tex;
|
|||||||
in vec2 uv;
|
in vec2 uv;
|
||||||
out vec4 FragColor;
|
out vec4 FragColor;
|
||||||
|
|
||||||
float delta = .1;
|
float delta = .0001;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
@ -9,15 +9,15 @@ out vec4 FragColor;
|
|||||||
vec3 getCIEYxy(vec3 rgbColor);
|
vec3 getCIEYxy(vec3 rgbColor);
|
||||||
vec3 getRGBFromCIEXxy(vec3 YxyColor);
|
vec3 getRGBFromCIEXxy(vec3 YxyColor);
|
||||||
|
|
||||||
float exposure = .3;
|
float exposure = .2;
|
||||||
float whitePoint = 1.;
|
float whitePoint = 1.;
|
||||||
float delta = .1;
|
float delta = .0001;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 col = texture(tex, uv);
|
vec4 col = texture(tex, uv);
|
||||||
float avgLuminance = textureLod(logluminancetex, uv, 10.).x;
|
float avgLuminance = textureLod(logluminancetex, uv, 10.).x;
|
||||||
avgLuminance = exp(avgLuminance) - delta;
|
avgLuminance = max(exp(avgLuminance) - delta, delta);
|
||||||
|
|
||||||
vec3 Yxy = getCIEYxy(col.xyz);
|
vec3 Yxy = getCIEYxy(col.xyz);
|
||||||
float Lp = Yxy.r * exposure / avgLuminance;
|
float Lp = Yxy.r * exposure / avgLuminance;
|
||||||
|
Loading…
Reference in New Issue
Block a user