Remove !sRGB in shader which is always true now
Also don't use tonemap in RTT
This commit is contained in:
parent
4025883243
commit
45957af6f8
@ -39,7 +39,7 @@ void main(void)
|
||||
vec4 particle_color = vec4(color_lifetime.zyx, 1.0);
|
||||
tc = Texcoord;
|
||||
|
||||
#if !defined(sRGB_Framebuffer_Usable) && !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
particle_color.rgb = pow(particle_color.rgb, vec3(1.0 / 2.2));
|
||||
#endif
|
||||
pc = particle_color;
|
||||
|
@ -44,7 +44,7 @@ void main(void)
|
||||
vec4 particle_color = vec4(color_lifetime.zyx, 1.0) * alpha;
|
||||
tc = Texcoord;
|
||||
|
||||
#if !defined(sRGB_Framebuffer_Usable) && !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
particle_color.rgb = pow(particle_color.rgb, vec3(1.0 / 2.2));
|
||||
#endif
|
||||
pc = particle_color;
|
||||
|
@ -31,11 +31,7 @@ void main(void)
|
||||
|
||||
vec3 final_color = col.xyz * color.xyz;
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(sRGB_Framebuffer_Usable)
|
||||
final_color = final_color * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
final_color = final_color * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
o_diffuse_color = vec4(final_color, 1.0);
|
||||
|
||||
|
@ -17,11 +17,7 @@ void main(void)
|
||||
|
||||
vec3 final_color = layer_two_tex.rgb + color.rgb * (1.0 - layer_two_tex.a);
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(sRGB_Framebuffer_Usable)
|
||||
final_color = final_color * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
final_color = final_color * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
o_diffuse_color = vec4(final_color, 1.0);
|
||||
|
||||
|
@ -30,11 +30,7 @@ void main()
|
||||
|
||||
vec3 final_color = col.xyz * color.xyz;
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(sRGB_Framebuffer_Usable)
|
||||
final_color = final_color * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
final_color = final_color * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
o_diffuse_color = vec4((final_color * custom_alpha), custom_alpha);
|
||||
|
@ -29,11 +29,7 @@ void main(void)
|
||||
|
||||
vec3 final_color = col.xyz;
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(sRGB_Framebuffer_Usable)
|
||||
final_color = final_color * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
final_color = final_color * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
o_diffuse_color = vec4(final_color, 1.0);
|
||||
|
||||
|
@ -23,7 +23,7 @@ void main()
|
||||
vec3 old_hsv = rgbToHsv(col.rgb);
|
||||
float mask_step = step(mask, 0.5);
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
float saturation = mask * 2.1;
|
||||
float saturation = mask * 1.825; // 2.5 * 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
float saturation = mask * 2.5;
|
||||
#endif
|
||||
@ -35,11 +35,7 @@ void main()
|
||||
|
||||
vec3 final_color = col.xyz * color.xyz;
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(sRGB_Framebuffer_Usable)
|
||||
final_color = final_color * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
final_color = final_color * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
o_diffuse_color = vec4(final_color, 1.0);
|
||||
|
||||
|
@ -21,7 +21,7 @@ void main(void)
|
||||
vec3 old_hsv = rgbToHsv(col.rgb);
|
||||
float mask_step = step(mask, 0.5);
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
float saturation = mask * 2.1;
|
||||
float saturation = mask * 1.825; // 2.5 * 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
float saturation = mask * 2.5;
|
||||
#endif
|
||||
@ -33,11 +33,7 @@ void main(void)
|
||||
|
||||
vec3 final_color = col.xyz * color.xyz;
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(sRGB_Framebuffer_Usable)
|
||||
final_color = final_color * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
final_color = final_color * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
o_diffuse_color = vec4(final_color, 1.0);
|
||||
|
||||
|
@ -19,11 +19,7 @@ void main(void)
|
||||
|
||||
vec3 final_color = col.xyz * color.xyz;
|
||||
#if !defined(Advanced_Lighting_Enabled)
|
||||
#if !defined(sRGB_Framebuffer_Usable)
|
||||
final_color = final_color * 0.73; // 0.5 ^ (1. / 2.2)
|
||||
#else
|
||||
final_color = final_color * 0.5;
|
||||
#endif
|
||||
#endif
|
||||
o_diffuse_color = vec4(final_color, 1.0);
|
||||
|
||||
|
@ -13,10 +13,6 @@ void main()
|
||||
|
||||
// Uncharted2 tonemap with Auria's custom coefficients
|
||||
vec4 perChannel = (col * (6.9 * col + .5)) / (col * (5.2 * col + 1.7) + 0.06);
|
||||
#if !(!defined(sRGB_Framebuffer_Usable) && defined(Advanced_Lighting_Enabled))
|
||||
perChannel = pow(perChannel, vec4(2.2));
|
||||
#endif
|
||||
|
||||
vec2 inside = uv - 0.5;
|
||||
float vignette = 1. - dot(inside, inside) * vignette_weight;
|
||||
vignette = clamp(pow(vignette, 0.8), 0., 1.);
|
||||
|
@ -886,15 +886,15 @@ void ShaderBasedRenderer::renderToTexture(GL3RenderTarget *render_target,
|
||||
if (CVS->isDefferedEnabled())
|
||||
{
|
||||
renderSceneDeferred(camera, dt, false, true);
|
||||
render_target->setFrameBuffer(m_post_processing
|
||||
->render(camera, false, m_rtts));
|
||||
}
|
||||
else
|
||||
{
|
||||
renderScene(camera, dt, false, true);
|
||||
render_target->setFrameBuffer(&m_rtts->getFBO(FBO_COLORS));
|
||||
}
|
||||
|
||||
render_target->setFrameBuffer(m_post_processing
|
||||
->render(camera, false, m_rtts));
|
||||
|
||||
// reset
|
||||
glViewport(0, 0,
|
||||
irr_driver->getActualScreenSize().Width,
|
||||
|
Loading…
Reference in New Issue
Block a user