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