[WW] Fix missing AO on high res, tweak colour logic

tweak colour logic
Destructive operations (truncation) should be performed as late as
possible

Fix missing AO on high res
Light bleed fix offsets the scaling
* Any sub res should scale x2
* Any actual tv res fx should not
This commit is contained in:
getdls 2018-01-01 16:30:02 +01:00
parent 891dab9690
commit fba6a5c07f
3 changed files with 8 additions and 7 deletions

View File

@ -6,13 +6,13 @@ const float resScale = 4.0;
//old contrasty, or just copy paste clarity //old contrasty, or just copy paste clarity
const float gamma = 0.85; // 1.0 is neutral Botw is already colour graded at this stage const float gamma = 0.85; // 1.0 is neutral Botw is already colour graded at this stage
const float exposure = 1.03; // 1.0 is neutral const float exposure = 1.02; // 1.0 is neutral
const float vibrance = 0.02; // 0.0 is neutral const float vibrance = 0.015; // 0.0 is neutral
const float crushContrast = 0.00; // 0.0 is neutral. Use small increments, loss of shadow detail const float crushContrast = 0.00; // 0.0 is neutral. Use small increments, loss of shadow detail
vec3 contrasty(vec3 colour){ vec3 contrasty(vec3 colour){
vec3 fColour = (colour.xyz); vec3 fColour = (colour.xyz);
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
fColour = clamp(exposure * fColour, 0.0, 1.0); fColour = clamp(exposure * fColour, 0.0, 1.0);
fColour = pow(fColour, vec3(1.0 / gamma)); fColour = pow(fColour, vec3(1.0 / gamma));
float luminance = fColour.r*0.299 + fColour.g*0.587 + fColour.b*0.114; float luminance = fColour.r*0.299 + fColour.g*0.587 + fColour.b*0.114;
@ -22,6 +22,7 @@ vec3 contrasty(vec3 colour){
vec3 lightness = vec3((mn + mx) / 2.0); vec3 lightness = vec3((mn + mx) / 2.0);
// vibrance // vibrance
fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat); fColour = mix(fColour, mix(fColour, lightness, -vibrance), sat);
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
return fColour; return fColour;
} }

View File

@ -2,8 +2,8 @@
include 'Source/functions.php'; include 'Source/functions.php';
$fullWidth = $argv[1]; $fullWidth = $argv[1];
$fullHeight = $argv[2]; $fullHeight = $argv[2];
$scaleFactorX = always_decimal_format($fullWidth / 1920.0*2.0); $scaleFactorX = always_decimal_format($fullWidth / 1920.0);
$scaleFactorY = always_decimal_format($fullHeight / 1080.0*2.0); $scaleFactorY = always_decimal_format($fullHeight / 1080.0);
?> ?>
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable

View File

@ -2,8 +2,8 @@
include 'Source/functions.php'; include 'Source/functions.php';
$fullWidth = $argv[1]; $fullWidth = $argv[1];
$fullHeight = $argv[2]; $fullHeight = $argv[2];
$scaleFactorX = always_decimal_format($fullWidth / 1920.0*2.0); $scaleFactorX = always_decimal_format($fullWidth / 1920.0);
$scaleFactorY = always_decimal_format($fullHeight / 1080.0)*2.0; $scaleFactorY = always_decimal_format($fullHeight / 1080.0);
?> ?>
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable