mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2025-01-27 00:45:36 +01:00
[BotW] contrasty add experimental saturation
adjust native saturation found in shader
This commit is contained in:
parent
87d967bc6a
commit
a83434897f
@ -1,16 +1,21 @@
|
|||||||
#version 420
|
#version 420
|
||||||
#extension GL_ARB_texture_gather : enable
|
#extension GL_ARB_texture_gather : enable
|
||||||
// shader bd8bba59e2149449
|
// shader bd8bba59e2149449
|
||||||
// Contrasty + Adjustable Bloom
|
// Contrasty + Adjustable Bloom + Adjust Saturation
|
||||||
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
// original shader dumped using cemu 1.10.0f, BotW 1.3.1
|
||||||
|
|
||||||
//----------------------------settings-------------------------------------
|
//----------------------------settings-------------------------------------
|
||||||
|
|
||||||
// #define only_adjustbloom
|
#define adjust_bloom 1
|
||||||
// uncomment above to only use 'adjustable bloom', all other features in contrasty will be disabled.
|
#define adjust_saturation 1
|
||||||
|
#define contrasty 1
|
||||||
|
// 0: disable, 1: enable.
|
||||||
|
|
||||||
const float bloomFactor = 0.7; // 1.0 is neutral
|
const float bloomFactor = 0.7; // 1.0 is neutral
|
||||||
const float gamma = 0.81; // 1.0 is neutral Botw is already colour graded at this stage
|
|
||||||
|
const float satFactor = 0.3; // 0.17999995 is neutral. Experimental, adjust native saturation
|
||||||
|
|
||||||
|
const float gamma = 0.81; // 1.0 is neutral. Botw is already colour graded at this stage
|
||||||
const float exposure = 1.17; // 1.0 is neutral
|
const float exposure = 1.17; // 1.0 is neutral
|
||||||
const float vibrance = 0.008; // 0.0 is neutral
|
const float vibrance = 0.008; // 0.0 is neutral
|
||||||
const float crushContrast = 0.004; // 0.0 is neutral. Use small increments, loss of shadow detail
|
const float crushContrast = 0.004; // 0.0 is neutral. Use small increments, loss of shadow detail
|
||||||
@ -18,8 +23,8 @@ const float crushContrast = 0.004; // 0.0 is neutral. Use small increments, loss
|
|||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
||||||
uniform ivec4 uf_remappedPS[1];
|
uniform ivec4 uf_remappedPS[1];
|
||||||
layout(binding = 0) uniform sampler2D textureUnitPS0;// Tex0 addr 0xf46ac800 res 320x180x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x5) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
|
layout(binding = 0) uniform sampler2D textureUnitPS0;
|
||||||
layout(binding = 1) uniform sampler2D textureUnitPS1;// Tex1 addr 0xf5c7b800 res 1280x720x1 dim 1 tm: 4 format 0816 compSel: 0 1 2 5 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler1 ClampX/Y/Z: 2 2 2 border: 1
|
layout(binding = 1) uniform sampler2D textureUnitPS1;
|
||||||
layout(location = 0) in vec4 passParameterSem0;
|
layout(location = 0) in vec4 passParameterSem0;
|
||||||
layout(location = 0) out vec4 passPixelColor0;
|
layout(location = 0) out vec4 passPixelColor0;
|
||||||
uniform vec2 uf_fragCoordScale;
|
uniform vec2 uf_fragCoordScale;
|
||||||
@ -52,7 +57,11 @@ vec3 cubeMapSTM;
|
|||||||
int cubeMapFaceId;
|
int cubeMapFaceId;
|
||||||
R0f = passParameterSem0;
|
R0f = passParameterSem0;
|
||||||
R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
|
R1f.xyz = (texture(textureUnitPS0, R0f.xy).xyz);
|
||||||
|
|
||||||
|
#if (adjust_bloom == 1)
|
||||||
R1f.xyz *= bloomFactor;
|
R1f.xyz *= bloomFactor;
|
||||||
|
#endif
|
||||||
|
|
||||||
R0f.xyz = (texture(textureUnitPS1, R0f.xy).xyz);
|
R0f.xyz = (texture(textureUnitPS1, R0f.xy).xyz);
|
||||||
// 0
|
// 0
|
||||||
R126f.x = R1f.x + R0f.x;
|
R126f.x = R1f.x + R0f.x;
|
||||||
@ -134,7 +143,13 @@ R125f.w = R126f.x + -(PS0f);
|
|||||||
R126f.y = backupReg1f + -(PS0f);
|
R126f.y = backupReg1f + -(PS0f);
|
||||||
PS1f = R126f.y;
|
PS1f = R126f.y;
|
||||||
// 12
|
// 12
|
||||||
|
|
||||||
|
#if (adjust_saturation == 1)
|
||||||
|
R126f.x = (mul_nonIEEE(PV1f.y,satFactor) + intBitsToFloat(uf_remappedPS[0].x));
|
||||||
|
#else
|
||||||
R126f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x));
|
R126f.x = (mul_nonIEEE(PV1f.y,intBitsToFloat(uf_remappedPS[0].y)) + intBitsToFloat(uf_remappedPS[0].x));
|
||||||
|
#endif
|
||||||
|
|
||||||
PV0f.x = R126f.x;
|
PV0f.x = R126f.x;
|
||||||
PV0f.y = -(R126f.z) + PV1f.x;
|
PV0f.y = -(R126f.z) + PV1f.x;
|
||||||
// 13
|
// 13
|
||||||
@ -145,8 +160,7 @@ R0f.x = (mul_nonIEEE(R126f.x,R125f.w) + PV1f.w);
|
|||||||
R0f.y = (mul_nonIEEE(R126f.x,R127f.z) + PV1f.w);
|
R0f.y = (mul_nonIEEE(R126f.x,R127f.z) + PV1f.w);
|
||||||
R0f.z = (mul_nonIEEE(R126f.x,R126f.y) + PV1f.w);
|
R0f.z = (mul_nonIEEE(R126f.x,R126f.y) + PV1f.w);
|
||||||
|
|
||||||
#ifndef only_adjustbloom
|
#if (contrasty == 1)
|
||||||
//Color Tweak
|
|
||||||
vec3 fColour = R0f.xyz;
|
vec3 fColour = R0f.xyz;
|
||||||
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
|
fColour = max(vec3(0.0), fColour - vec3(crushContrast));
|
||||||
fColour = clamp(exposure * fColour, 0.0, 1.0);
|
fColour = clamp(exposure * fColour, 0.0, 1.0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user