mirror of
https://github.com/cemu-project/cemu_graphic_packs.git
synced 2024-11-22 01:29:18 +01:00
[TP] FancyFX - removed LOD / .w shader is broken on Vulkan
This commit is contained in:
parent
85ffa02601
commit
55de532386
@ -1,111 +0,0 @@
|
||||
#version 420
|
||||
#extension GL_ARB_texture_gather : enable
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
#ifdef VULKAN
|
||||
#define ATTR_LAYOUT(__vkSet, __location) layout(set = __vkSet, location = __location)
|
||||
#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 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 gl_VertexID gl_VertexIndex
|
||||
#define gl_InstanceID gl_InstanceIndex
|
||||
#else
|
||||
#define ATTR_LAYOUT(__vkSet, __location) layout(location = __location)
|
||||
#define UNIFORM_BUFFER_LAYOUT(__glLocation, __vkSet, __vkLocation) layout(binding = __glLocation, std140)
|
||||
#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)
|
||||
#endif
|
||||
// This shader was automatically converted to be cross-compatible with Vulkan and OpenGL.
|
||||
|
||||
// shader e334517825fdd599
|
||||
//basline dof blur..
|
||||
|
||||
const float scaleBlur = $scaleBlur; //0.125 4k
|
||||
const int sampleScaling = $presetPass;
|
||||
|
||||
#define EnableBlur $enableBlur
|
||||
|
||||
TEXTURE_LAYOUT(0, 1, 0) uniform sampler2D textureUnitPS0;
|
||||
layout(location = 0) in vec4 passParameterSem0;
|
||||
layout(location = 0) out vec4 passPixelColor0;
|
||||
#ifdef VULKAN
|
||||
layout(set = 1, binding = 1) uniform ufBlock
|
||||
{
|
||||
uniform vec4 uf_fragCoordScale;
|
||||
};
|
||||
#else
|
||||
uniform vec2 uf_fragCoordScale;
|
||||
#endif
|
||||
|
||||
|
||||
const int sampleScale = 2 + sampleScaling;
|
||||
|
||||
//const int sampleScale = 2 + sampleScaling;
|
||||
// FabriceNeyret2 CC, single shader gaussian by intermediate MIPmap level. www.shadertoy.com/view/ltScRG
|
||||
const int samples = 4 * sampleScale, //8 or 4 balances xy position + brightness hack
|
||||
LOD = 2, // gaussian done on MIPmap at scale LOD
|
||||
sLOD = 1 << LOD; // tile size = 2^LOD
|
||||
const float sigma = float(samples) * .25;
|
||||
|
||||
float gaussian(vec2 i) {
|
||||
return exp(-.5* dot(i /= sigma, i)) / (6.28 * sigma*sigma);
|
||||
}
|
||||
|
||||
vec4 blur(sampler2D sp, vec2 U, vec2 scale) {
|
||||
vec4 O = vec4(0.0);
|
||||
int s = samples / sLOD;
|
||||
|
||||
for (int i = 0; i < s*s; i++) {
|
||||
vec2 d = vec2(i%s, i / s)*float(sLOD) - float(samples) / 2.;
|
||||
O += gaussian(d) * textureLod(sp, U + scale * d, float(LOD));
|
||||
}
|
||||
|
||||
//return O / O.a;
|
||||
return vec4(O.x, O.y, O.z, 0.0)*20.0; // balance loss of brightness
|
||||
}
|
||||
|
||||
int clampFI32(int v)
|
||||
{
|
||||
if( v == 0x7FFFFFFF )
|
||||
return floatBitsToInt(1.0);
|
||||
else if( v == 0xFFFFFFFF )
|
||||
return floatBitsToInt(0.0);
|
||||
return floatBitsToInt(clamp(intBitsToFloat(v), 0.0, 1.0));
|
||||
}
|
||||
float mul_nonIEEE(float a, float b){return mix(0.0, a*b, (a != 0.0) && (b != 0.0));}
|
||||
void main()
|
||||
{
|
||||
vec4 R0f = vec4(0.0);
|
||||
vec4 R9f = vec4(0.0);
|
||||
float backupReg0f, backupReg1f, backupReg2f, backupReg3f, backupReg4f;
|
||||
vec4 PV0f = vec4(0.0), PV1f = vec4(0.0);
|
||||
float PS0f = 0.0, PS1f = 0.0;
|
||||
vec4 tempf = vec4(0.0);
|
||||
float tempResultf;
|
||||
int tempResulti;
|
||||
ivec4 ARi = ivec4(0);
|
||||
bool predResult = true;
|
||||
vec3 cubeMapSTM;
|
||||
int cubeMapFaceId;
|
||||
R0f = passParameterSem0;
|
||||
|
||||
|
||||
#if (EnableBlur == 1)
|
||||
vec2 scaler = uf_fragCoordScale.xy;
|
||||
vec2 coord = R0f.xy*textureSize(textureUnitPS0, 0); //
|
||||
vec2 ps = vec2(1.0) / textureSize(textureUnitPS0, 0);
|
||||
vec2 uv = coord * ps;
|
||||
|
||||
R9f.xyz = blur(textureUnitPS0, R0f.xy, ps*0.5*scaleBlur*scaler).xyz;
|
||||
R0f.w = (textureLod(textureUnitPS0, R0f.xy,0.0).w);
|
||||
// export
|
||||
passPixelColor0 = vec4(R9f.x, R9f.y, R9f.z, R0f.w);
|
||||
|
||||
#elif (EnableBlur == 0)
|
||||
R0f.xyzw = (textureLod(textureUnitPS0, R0f.xy,0.0).xyzw);
|
||||
// export
|
||||
passPixelColor0 = vec4(R0f.x, R0f.y, R0f.z, R0f.w);
|
||||
#endif
|
||||
|
||||
}
|
@ -1,482 +0,0 @@
|
||||
[Definition]
|
||||
titleIds = 000500001019C800,000500001019E600,000500001019E500
|
||||
name = Resolution
|
||||
path = "The Legend of Zelda: Twilight Princess HD/Enhancements/Fancy FX"
|
||||
description = Pretty blur, shadow x2, de-band sky, maintained on Nvidia. Made by getdls.
|
||||
version = 4
|
||||
|
||||
|
||||
[Preset] # Gaussian blur w correct scaling
|
||||
name = Light blur - 1080p 8 pass
|
||||
$dither = 0.2
|
||||
$scaleShader = 1.0
|
||||
$scaleBlur = 1.0
|
||||
$internalRes = 1
|
||||
$presetPass:int = 0
|
||||
$enableBlur:int = 1
|
||||
|
||||
[Preset] # Scaling offset, looks blurrier on high res as additional passes mostly hide the error
|
||||
name = ~1440p 8 pass
|
||||
$dither = 0.2
|
||||
$scaleShader = 1.0
|
||||
$scaleBlur = 1.25
|
||||
$internalRes = 1
|
||||
$presetPass:int = 0
|
||||
$enableBlur:int = 1
|
||||
|
||||
[Preset] # gaussian blur w correct scaling and an additional 4 passes
|
||||
name = 2160p 12 pass
|
||||
$dither = 0.2
|
||||
$scaleShader = 1.0
|
||||
$scaleBlur = 1.0
|
||||
$internalRes = 1
|
||||
$presetPass:int = 1
|
||||
$enableBlur:int = 1
|
||||
|
||||
[Preset] # Scaling offset, looks blurrier on high res as additional passes mostly hide the error
|
||||
name = ~2160p+ 12 pass
|
||||
$dither = 0.2
|
||||
$scaleShader = 1.0
|
||||
$scaleBlur = 1.25
|
||||
$internalRes = 1
|
||||
$presetPass:int = 1
|
||||
$enableBlur:int = 1
|
||||
|
||||
[Preset] # Scaling offset, looks blurrier on high res as additional passes mostly hide the error
|
||||
name = ~4320p 16 pass
|
||||
$dither = 0.2
|
||||
$scaleShader = 1.0
|
||||
$scaleBlur = 3.0
|
||||
$internalRes = 1
|
||||
$presetPass:int = 2
|
||||
$enableBlur:int = 1
|
||||
|
||||
[Preset] #
|
||||
name = Disable extra blur, keep other tweaks active
|
||||
$dither = 0.2
|
||||
$scaleShader = 1.0
|
||||
$scaleBlur = 1.0
|
||||
$internalRes = 1
|
||||
$presetPass:int = 0
|
||||
$enableBlur:int = 0
|
||||
|
||||
#[Preset] # Tanks performance, debug merge w res file.
|
||||
#name = +1 Blur pass and defocus.
|
||||
#$dither = 0.2
|
||||
#$scaleShader = 1.0
|
||||
#$scaleBlur = 1.5
|
||||
#$internalRes = 1
|
||||
#$presetPass:int = 1
|
||||
#$enableBlur:int = 1
|
||||
|
||||
[TextureRedefine] #Double shadow res
|
||||
width = 384
|
||||
height = 384
|
||||
###formatsExcluded =
|
||||
overwriteWidth = 768
|
||||
overwriteHeight = 768
|
||||
|
||||
## 1a -> 1f
|
||||
|
||||
#De-banding
|
||||
[TextureRedefine]
|
||||
width = 1920
|
||||
height = 1088
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine]
|
||||
width = 1920
|
||||
height = 1080
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] #
|
||||
width = 1280
|
||||
height = 720
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
#[TextureRedefine] # spider web break
|
||||
#width = 1024
|
||||
#height = 1024
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
#[TextureRedefine] # clouds
|
||||
#width = 1024
|
||||
#height = 512
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
#
|
||||
#[TextureRedefine] # clouds
|
||||
#width = 1024
|
||||
#height = 256
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
#[TextureRedefine] # confirmation dialog not x8
|
||||
#width = 1024
|
||||
#height = 449
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] #viewport 0.5
|
||||
width = 960
|
||||
height = 544
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine]
|
||||
width = 960
|
||||
height = 540
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
#[TextureRedefine] #
|
||||
#width = 512
|
||||
#height = 512
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] # bloom n cutscene
|
||||
width = 480
|
||||
height = 272
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] # x8
|
||||
width = 480
|
||||
height = 270
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] # x8
|
||||
width = 448
|
||||
height = 384
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
#[TextureRedefine] # pad map bg
|
||||
#width = 427
|
||||
#height = 480
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] #
|
||||
width = 384
|
||||
height = 384
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] #
|
||||
width = 320
|
||||
height = 288
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] #
|
||||
width = 320
|
||||
height = 180
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] # map xp
|
||||
width = 448
|
||||
height = 384
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] # Map xp
|
||||
width = 442
|
||||
height = 383
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] # mini map, all projections must be same overwriteFormat or break.
|
||||
width = 435
|
||||
height = 381
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
[TextureRedefine] # mini map, all projections must be same overwriteFormat or break.
|
||||
width = 290
|
||||
height = 280
|
||||
formats = 0x01a
|
||||
overwriteFormat = 0x01f
|
||||
|
||||
#[TextureRedefine] #pro contr
|
||||
#width = 263
|
||||
#height = 191
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
#[TextureRedefine] # eyes
|
||||
#width = 256
|
||||
#height = 256
|
||||
#formats = 0x01a
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
## 7->f
|
||||
[TextureRedefine] #viewport
|
||||
width = 960
|
||||
height = 544
|
||||
formats = 0x007
|
||||
overwriteFormat = 0x00f
|
||||
|
||||
[TextureRedefine]
|
||||
width = 960
|
||||
height = 540
|
||||
formats = 0x007
|
||||
overwriteFormat = 0x00f
|
||||
|
||||
#[TextureRedefine] #cloud
|
||||
#width = 1024
|
||||
#height = 512
|
||||
#formats = 0x007
|
||||
#overwriteFormat = 0x00f
|
||||
|
||||
#[TextureRedefine] #fix godray, break drooling plant
|
||||
#width = 256
|
||||
#height = 256
|
||||
#formats = 0x007
|
||||
#overwriteFormat = 0x00f
|
||||
|
||||
#[TextureRedefine] #dust
|
||||
#width = 128
|
||||
#height = 128
|
||||
#formats = 0x007
|
||||
#overwriteFormat = 0x00f
|
||||
|
||||
#[TextureRedefine] #dust
|
||||
#width = 64
|
||||
#height = 64
|
||||
#formats = 0x007
|
||||
#overwriteFormat = 0x00f
|
||||
|
||||
#[TextureRedefine] #dust?
|
||||
#width = 32
|
||||
#height = 32
|
||||
#formats = 0x007
|
||||
#overwriteFormat = 0x00f
|
||||
|
||||
#[TextureRedefine] #Gradient gui? removed until verified
|
||||
#width = 8
|
||||
#height = 64
|
||||
#formats = 0x007
|
||||
#overwriteFormat = 0x00f
|
||||
|
||||
#[TextureRedefine] #haze breaks
|
||||
#width = 32
|
||||
#height = 32
|
||||
#formats = 0x002
|
||||
#overwriteFormat = 0x007
|
||||
|
||||
#[TextureRedefine]
|
||||
#formats = 0x001
|
||||
#overwriteFormat = 0x005
|
||||
|
||||
#[TextureRedefine] #fix godrays, breaks fog
|
||||
#width = 256
|
||||
#height = 256
|
||||
#formats = 0x001
|
||||
#overwriteFormat = 0x005
|
||||
|
||||
#[TextureRedefine] #toxic mist breaks
|
||||
#width = 128
|
||||
#height = 128
|
||||
#formats = 0x001
|
||||
#overwriteFormat = 0x005
|
||||
|
||||
#[TextureRedefine] #toxic mist, air fog breaks
|
||||
#width = 64
|
||||
#height = 64
|
||||
#formats = 0x001
|
||||
#overwriteFormat = 0x005
|
||||
|
||||
#[TextureRedefine] #breaks
|
||||
#width = 32
|
||||
#height = 32
|
||||
#formats = 0x001
|
||||
#overwriteFormat = 0x005
|
||||
|
||||
##1 -> 5
|
||||
[TextureRedefine] #
|
||||
width = 1280
|
||||
height = 720
|
||||
formats = 0x001
|
||||
overwriteFormat = 0x005
|
||||
|
||||
#[TextureRedefine] #
|
||||
#width = 1024
|
||||
#height = 1024
|
||||
#formats = 0x001
|
||||
#overwriteFormat = 0x005
|
||||
|
||||
#[TextureRedefine] # castle intro
|
||||
#width = 1024
|
||||
#height = 256
|
||||
#formats = 0x001
|
||||
#overwriteFormat = 0x005
|
||||
|
||||
# 8 -> 1f
|
||||
#[TextureRedefine] #menu bg breaks do not use fmt 8
|
||||
#width = 960
|
||||
#height = 540
|
||||
#formats = 0x008
|
||||
#overwriteFormat = 0x01f
|
||||
|
||||
|
||||
#Res/formats not BC
|
||||
#
|
||||
#1280x720x1,0x001
|
||||
#1024x1024x1,0x001
|
||||
#1024x512x1,0x007
|
||||
#1024x256x1,0x007
|
||||
#1024x256x1,0x001
|
||||
#960x544x1,0x007
|
||||
#960x540x1,0x008
|
||||
#512x1024x1,0x001
|
||||
#512x512x1,0x001
|
||||
#416x278x1,0x001
|
||||
#256x256x1,0x007
|
||||
#256x256x1,0x001
|
||||
#140x140x1,0x001
|
||||
#128x256x1,0x001
|
||||
#128x128x1,0x007
|
||||
#128x128x1,0x002
|
||||
#128x128x1,0x001
|
||||
#128x117x1,0x007
|
||||
#128x96x1,0x001
|
||||
#128x77x1,0x001
|
||||
#128x64x1,0x001
|
||||
#128x32x1,0x001
|
||||
#112x146x1,0x001
|
||||
#112x112x1,0x007
|
||||
#96x96x1,0x001
|
||||
#90x82x1,0x007
|
||||
#90x80x1,0x007
|
||||
#88x88x1,0x007
|
||||
#83x83x1,0x007
|
||||
#64x512x1,0x001
|
||||
#64x128x1,0x007
|
||||
#64x64x1,0x007
|
||||
#64x64x1,0x002
|
||||
#64x64x1,0x001
|
||||
#64x48x1,0x816
|
||||
#64x32x1,0x001
|
||||
#64x8x1,0x007
|
||||
#64x8x1,0x001
|
||||
#56x56x1,0x001
|
||||
#56x32x1,0x001
|
||||
#51x51x1,0x007
|
||||
#50x50x1,0x007
|
||||
#48x48x1,0x823
|
||||
#48x48x1,0x816
|
||||
#48x48x1,0x001
|
||||
#42x16x1,0x001
|
||||
#40x118x1,0x002
|
||||
#40x44x1,0x007
|
||||
#40x40x1,0x001
|
||||
#32x64x1,0x001
|
||||
#32x32x1,0x007
|
||||
#32x32x1,0x002
|
||||
#32x32x1,0x001
|
||||
#25x50x1,0x007
|
||||
#24x24x1,0x008
|
||||
#16x128x1,0x001
|
||||
#16x16x1,0x008
|
||||
#16x16x1,0x001
|
||||
#16x4x1,0x001
|
||||
#8x146x1,0x001
|
||||
#8x128x1,0x001
|
||||
#8x50x1,0x007
|
||||
#8x16x1,0x002
|
||||
#8x8x1,0x007
|
||||
#8x8x1,0x002
|
||||
#8x8x1,0x001
|
||||
|
||||
#2048x512x1,0x01a #Title nope
|
||||
#1920x1088x1,0x01a
|
||||
#1920x1080x1,0x01a
|
||||
#1280x720x1,0x01a
|
||||
#1024x449x1,0x01a
|
||||
#1024x223x1,0x01a
|
||||
#960x544x1,0x01a
|
||||
#960x540x1,0x01a
|
||||
#958x1024x1,0x01a
|
||||
#900x367x1,0x01a
|
||||
#864x480x1,0x01a
|
||||
#861x437x1,0x01a
|
||||
#854x480x1,0x01a
|
||||
#839x27x1,0x01a
|
||||
#832x720x1,0x01a
|
||||
#818x168x1,0x01a
|
||||
#813x718x1,0x01a
|
||||
#788x336x1,0x01a
|
||||
#640x368x1,0x01a
|
||||
#640x360x1,0x01a
|
||||
#607x418x1,0x01a
|
||||
#567x89x1,0x01a
|
||||
#560x95x1,0x01a
|
||||
#512x1024x1,0x01a
|
||||
#512x512x1,0x01a
|
||||
#512x256x1,0x01a
|
||||
#480x272x1,0x01a
|
||||
#480x270x1,0x01a
|
||||
#470x119x1,0x01a
|
||||
#450x165x1,0x01a
|
||||
#448x384x1,0x01a
|
||||
#442x383x1,0x01a
|
||||
#427x480x1,0x01a
|
||||
#397x85x1,0x01a
|
||||
#393x231x1,0x01a
|
||||
#384x384x1,0x01a
|
||||
#384x320x1,0x01a
|
||||
#362x319x1,0x01a
|
||||
#320x288x1,0x01a
|
||||
#290x280x1,0x01a
|
||||
#263x191x1,0x01a
|
||||
#262x140x1,0x01a
|
||||
#256x512x1,0x01a
|
||||
#256x256x1,0x01a
|
||||
#256x128x1,0x01a
|
||||
#236x86x1,0x01a
|
||||
#236x50x1,0x01a
|
||||
#234x133x1,0x01a
|
||||
#227x64x1,0x01a
|
||||
#211x50x1,0x01a
|
||||
#204x91x1,0x01a
|
||||
#192x512x1,0x01a
|
||||
#155x128x1,0x01a
|
||||
#150x150x1,0x01a
|
||||
#128x2048x1,0x01a
|
||||
#128x256x1,0x01a
|
||||
#128x128x1,0x01a
|
||||
#116x198x1,0x01a
|
||||
#100x105x1,0x01a
|
||||
#90x90x1,0x01a
|
||||
#90x70x1,0x01a
|
||||
#88x88x1,0x01a
|
||||
#85x170x1,0x01a
|
||||
#85x165x1,0x01a
|
||||
#83x83x1,0x01a
|
||||
#80x128x1,0x01a
|
||||
#80x80x1,0x01a
|
||||
#73x74x1,0x01a
|
||||
#64x1024x1,0x01a
|
||||
#64x512x1,0x01a
|
||||
#64x64x1,0x01a
|
||||
#60x60x1,0x01a
|
||||
#56x140x1,0x01a
|
||||
#55x55x1,0x01a
|
||||
#42x47x1,0x01a
|
||||
#40x40x1,0x01a
|
||||
#37x35x1,0x01a
|
||||
#30x30x1,0x01a
|
||||
#16x32x1,0x01a
|
||||
#10x10x1,0x01a
|
||||
#8x256x1,0x01a
|
||||
#8x8x1,0x01a
|
||||
#4x4x1,0x01a
|
||||
#3x30x1,0x01a
|
Loading…
Reference in New Issue
Block a user