mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-25 11:06:54 +01:00
[TP] Contrasty Vulkan + local fixes
This should play nice with the script update. Nasty merge conflict :( Local had folder changes and settings I never got around to commit.
This commit is contained in:
parent
22c1e06151
commit
ac5d1a770f
@ -1,24 +1,19 @@
|
|||||||
#version 420
|
#version 430
|
||||||
#extension GL_ARB_texture_gather : enable
|
#extension GL_ARB_texture_gather : enable
|
||||||
#extension GL_ARB_separate_shader_objects : enable
|
#extension GL_ARB_separate_shader_objects : enable
|
||||||
|
// shader c14019840473ff86
|
||||||
|
// start of shader inputs/outputs, predetermined by Cemu. Do not touch
|
||||||
#ifdef VULKAN
|
#ifdef VULKAN
|
||||||
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
|
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
|
||||||
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)
|
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation, std140)
|
||||||
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)
|
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(set = __vkSet, binding = __vkLocation)
|
||||||
#define SET_POSITION(_v) gl_Position = _v; gl_Position.z = (gl_Position.z + gl_Position.w) / 2.0
|
|
||||||
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
|
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale.xy,gl_FragCoord.zw)
|
||||||
#define gl_VertexID gl_VertexIndex
|
|
||||||
#define gl_InstanceID gl_InstanceIndex
|
|
||||||
#else
|
#else
|
||||||
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
|
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
|
||||||
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
|
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
|
||||||
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
|
#define TEXTURE_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation)
|
||||||
#define SET_POSITION(_v) gl_Position = _v
|
|
||||||
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
|
#define GET_FRAGCOORD() vec4(gl_FragCoord.xy*uf_fragCoordScale,gl_FragCoord.zw)
|
||||||
#endif
|
#endif
|
||||||
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
|
|
||||||
|
|
||||||
// shader c14019840473ff86 //aa
|
|
||||||
#ifdef VULKAN
|
#ifdef VULKAN
|
||||||
layout(set = 1, binding = 2) uniform ufBlock
|
layout(set = 1, binding = 2) uniform ufBlock
|
||||||
{
|
{
|
||||||
@ -27,16 +22,19 @@ uniform vec4 uf_fragCoordScale;
|
|||||||
#else
|
#else
|
||||||
uniform vec2 uf_fragCoordScale;
|
uniform vec2 uf_fragCoordScale;
|
||||||
#endif
|
#endif
|
||||||
|
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
|
||||||
|
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
|
||||||
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
|
// end of shader inputs/outputs
|
||||||
|
|
||||||
const float hazeFactor = 0.1;
|
const float hazeFactor = 0.1;
|
||||||
|
|
||||||
const float gamma = $gamma; // 1.0 is neutral Botw is already colour graded at this stage
|
const float gamma = $gamma; // 1.0 is neutral Botw is already colour graded at this stage
|
||||||
const float exposure = $exposure; // 1.0 is neutral
|
const float exposure = $exposure; // 1.0 is neutral
|
||||||
const float vibrance = $vibrance; // 0.0 is neutral
|
const float vibrance = $vibrance; // 0.0 is neutral
|
||||||
const float crushContrast = $crushContrast; // 0.0 is neutral. Use small increments, loss of shadow detail
|
const float crushContrast = $crushContrast; // 0.0 is neutral. Use small increments, loss of shadow detail
|
||||||
const float contrastCurve = $contrastCurve;
|
const float contrastCurve = $contrastCurve;
|
||||||
|
|
||||||
|
|
||||||
vec3 RGB_Lift = vec3($redShadows, $greenShadows , $blueSadows); // [0.000 to 2.000] Adjust shadows for Red, Green and Blue.
|
vec3 RGB_Lift = vec3($redShadows, $greenShadows , $blueSadows); // [0.000 to 2.000] Adjust shadows for Red, Green and Blue.
|
||||||
vec3 RGB_Gamma = vec3($redMid ,$greenMid, $blueMid); // [0.000 to 2.000] Adjust midtones for Red, Green and Blue
|
vec3 RGB_Gamma = vec3($redMid ,$greenMid, $blueMid); // [0.000 to 2.000] Adjust midtones for Red, Green and Blue
|
||||||
vec3 RGB_Gain = vec3($redHilight, $greenHilight, $blueHilight); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue
|
vec3 RGB_Gain = vec3($redHilight, $greenHilight, $blueHilight); // [0.000 to 2.000] Adjust highlights for Red, Green and Blue
|
||||||
@ -115,12 +113,6 @@ vec3 contrasty(vec3 colour){
|
|||||||
return fColour;
|
return fColour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
|
|
||||||
TEXTURE_LAYOUT(1, 1, 1) uniform sampler2D textureUnitPS1;
|
|
||||||
layout(location = 0) in vec4 passParameterSem0;
|
|
||||||
layout(location = 0) out vec4 passPixelColor0;
|
|
||||||
|
|
||||||
int clampFI32(int v)
|
int clampFI32(int v)
|
||||||
{
|
{
|
||||||
if( v == 0x7FFFFFFF )
|
if( v == 0x7FFFFFFF )
|
||||||
@ -148,6 +140,7 @@ ivec4 ARi = ivec4(0);
|
|||||||
bool predResult = true;
|
bool predResult = true;
|
||||||
vec3 cubeMapSTM;
|
vec3 cubeMapSTM;
|
||||||
int cubeMapFaceId;
|
int cubeMapFaceId;
|
||||||
|
float scaleRes = uf_fragCoordScale.x;
|
||||||
R0f = passParameterSem0;
|
R0f = passParameterSem0;
|
||||||
R0f.w = (textureGather(textureUnitPS1, R0f.xy).y);
|
R0f.w = (textureGather(textureUnitPS1, R0f.xy).y);
|
||||||
// 0
|
// 0
|
||||||
@ -163,8 +156,6 @@ R1f.xyzw = (textureGather(textureUnitPS1, R1f.xy).xyzw);
|
|||||||
R2f.yz = (textureGather(textureUnitPS1, R2f.zy).yz);
|
R2f.yz = (textureGather(textureUnitPS1, R2f.zy).yz);
|
||||||
R3f.xy = (textureGather(textureUnitPS1, R3f.xy).xy);
|
R3f.xy = (textureGather(textureUnitPS1, R3f.xy).xy);
|
||||||
// 0
|
// 0
|
||||||
|
|
||||||
|
|
||||||
PV0f.x = R2f.z + R3f.x;
|
PV0f.x = R2f.z + R3f.x;
|
||||||
PV0f.y = R1f.w + R0f.w;
|
PV0f.y = R1f.w + R0f.w;
|
||||||
PV0f.z = R1f.z + R3f.y;
|
PV0f.z = R1f.z + R3f.y;
|
||||||
@ -204,18 +195,18 @@ PV1f.y = tempf.x;
|
|||||||
PV1f.z = tempf.x;
|
PV1f.z = tempf.x;
|
||||||
PV1f.w = tempf.x;
|
PV1f.w = tempf.x;
|
||||||
// 6
|
// 6
|
||||||
R127f.z = PV1f.x * intBitsToFloat(0x3f400000)*0.5;
|
R127f.z = PV1f.x * intBitsToFloat(0x3f400000)* scaleRes;
|
||||||
PV0f.z = R127f.z;
|
PV0f.z = R127f.z;
|
||||||
// 7
|
// 7
|
||||||
R1f.x = (PV0f.z * intBitsToFloat(0xba088889)*0.5 + R0f.x);
|
R1f.x = (PV0f.z * intBitsToFloat(0xba088889) * scaleRes + R0f.x);
|
||||||
R1f.y = R0f.y;
|
R1f.y = R0f.y;
|
||||||
R2f.z = R0f.x;
|
R2f.z = R0f.x;
|
||||||
R2f.y = (PV0f.z * intBitsToFloat(0xba72b9d6)*0.5 + R0f.y);
|
R2f.y = (PV0f.z * intBitsToFloat(0xba72b9d6) * scaleRes + R0f.y);
|
||||||
PS1f = R2f.y;
|
PS1f = R2f.y;
|
||||||
// 8
|
// 8
|
||||||
R3f.x = (R127f.z * intBitsToFloat(0x3a088889)*0.5 + R0f.x);
|
R3f.x = (R127f.z * intBitsToFloat(0x3a088889) * scaleRes + R0f.x);
|
||||||
R3f.y = R0f.y;
|
R3f.y = R0f.y;
|
||||||
R0f.w = (R127f.z * intBitsToFloat(0x3a72b9d6) + R0f.y);
|
R0f.w = (R127f.z * intBitsToFloat(0x3a72b9d6) * scaleRes + R0f.y);
|
||||||
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
R1f.xyzw = (texture(textureUnitPS0, R1f.xy).xyzw);
|
||||||
R2f.xyzw = (texture(textureUnitPS0, R2f.zy).xyzw);
|
R2f.xyzw = (texture(textureUnitPS0, R2f.zy).xyzw);
|
||||||
R3f.xyzw = (texture(textureUnitPS0, R3f.xy).xyzw);
|
R3f.xyzw = (texture(textureUnitPS0, R3f.xy).xyzw);
|
||||||
@ -243,19 +234,9 @@ R0f.y = PV0f.z * 0.25;
|
|||||||
R0f.z = PV0f.y * 0.25;
|
R0f.z = PV0f.y * 0.25;
|
||||||
R0f.w = PV0f.x * 0.25;
|
R0f.w = PV0f.x * 0.25;
|
||||||
// export
|
// export
|
||||||
//R0f.xyz = vec3(Sigmoid(R0f.x), Sigmoid(R0f.y),Sigmoid(R0f.z));
|
|
||||||
//R0f.x = Sigmoid(R0f.x);
|
|
||||||
//R0f.y = Sigmoid(R0f.y);
|
|
||||||
|
|
||||||
//R0f.xyz = contrasty(R0f.xyz);
|
|
||||||
//R0f.y = Sigmoid(R0f.y)
|
|
||||||
//R0f.xyz = clamp(R0f.xyz,0,1);
|
|
||||||
//R0f.x = max(0.0, R0f.x - crushContrast);
|
|
||||||
|
|
||||||
R0f.xyz = contrasty(R0f.xyz);
|
R0f.xyz = contrasty(R0f.xyz);
|
||||||
R0f.xyz = mix(R0f.xyz, smoothstep(0.0, 1.0, R0f.xyz), contrastCurve);
|
R0f.xyz = mix(R0f.xyz, smoothstep(0.0, 1.0, R0f.xyz), contrastCurve);
|
||||||
//vec3 mix(vec3 x, vec3 y, float a)
|
|
||||||
//R0f.xyz = mix(contrasty(R0f.xyz), vec3(Sigmoid(R0f.x), Sigmoid(R0f.y),Sigmoid(R0f.z)), 0.25);
|
|
||||||
float smask = lumasharping(textureUnitPS0, passParameterSem0.xy);
|
float smask = lumasharping(textureUnitPS0, passParameterSem0.xy);
|
||||||
vec3 temp3 = R0f.xyz;
|
vec3 temp3 = R0f.xyz;
|
||||||
R0f.xyz = mix(R0f.xyz, (temp3.xyz += (smask)), sharp_mix);
|
R0f.xyz = mix(R0f.xyz, (temp3.xyz += (smask)), sharp_mix);
|
||||||
|
@ -127,20 +127,20 @@ $redHilight = 0.99
|
|||||||
$greenHilight = 0.99 #.86
|
$greenHilight = 0.99 #.86
|
||||||
$blueHilight = 1.05 #1.14
|
$blueHilight = 1.05 #1.14
|
||||||
|
|
||||||
$contrastCurve = 0.95
|
$contrastCurve = 0.75
|
||||||
$hazeFactor = 0.1
|
$hazeFactor = 0.1
|
||||||
$bloom = 0.975
|
$bloom = 0.975
|
||||||
$gamma = 1.05
|
$gamma = 1.03
|
||||||
$exposure = 1.0
|
$exposure = 1.01
|
||||||
$vibrance = 0.29
|
$vibrance = 0.25
|
||||||
$crushContrast = 0.0
|
$crushContrast = 0.0
|
||||||
$bleach = 0.875
|
$bleach = 0.875
|
||||||
$sharp_mix = 0.00
|
$sharp_mix = 0.00
|
||||||
|
|
||||||
[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx
|
[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx
|
||||||
name = Cold contrast crush
|
name = Cold contrast crush
|
||||||
$redShadows = 0.98 #1.02 #0.99
|
$redShadows = 1.01 #1.02 #0.99
|
||||||
$greenShadows = 1.01 #1.05 # 1.0
|
$greenShadows = 1.03 #1.05 # 1.0
|
||||||
$blueSadows = 1.04 #1.0 #1.01
|
$blueSadows = 1.04 #1.0 #1.01
|
||||||
$redMid = 0.99 #0.87
|
$redMid = 0.99 #0.87
|
||||||
$greenMid = 1.06 #0.9 #0.88
|
$greenMid = 1.06 #0.9 #0.88
|
||||||
@ -149,7 +149,7 @@ $redHilight = 0.98
|
|||||||
$greenHilight = 0.97 #.86
|
$greenHilight = 0.97 #.86
|
||||||
$blueHilight = 1.08 #1.14
|
$blueHilight = 1.08 #1.14
|
||||||
|
|
||||||
$contrastCurve = 0.95
|
$contrastCurve = 0.75
|
||||||
$hazeFactor = 0.1
|
$hazeFactor = 0.1
|
||||||
$bloom = 0.975
|
$bloom = 0.975
|
||||||
$gamma = 1.01
|
$gamma = 1.01
|
||||||
@ -161,8 +161,8 @@ $sharp_mix = 0.00
|
|||||||
|
|
||||||
[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx
|
[Preset] #Neutral/cold white point, light and shadows interplay, caves are dark. Some discoloration of multi layer fx
|
||||||
name = Cold contrast preserve highlights
|
name = Cold contrast preserve highlights
|
||||||
$redShadows = 0.98 #1.02 #0.99
|
$redShadows = 1.01 #1.02 #0.99
|
||||||
$greenShadows = 1.01 #1.05 # 1.0
|
$greenShadows = 1.02 #1.05 # 1.0
|
||||||
$blueSadows = 1.04 #1.0 #1.01
|
$blueSadows = 1.04 #1.0 #1.01
|
||||||
$redMid = 0.97 #0.87
|
$redMid = 0.97 #0.87
|
||||||
$greenMid = 1.06 #0.9 #0.88
|
$greenMid = 1.06 #0.9 #0.88
|
||||||
|
Loading…
Reference in New Issue
Block a user