[XCX] scaling 806,820

Scaling 32,x32 8 etc if not
0x031,0x032,0x033,0x034,0x431,0x432,0x433,0x434,0x435,0x081
This commit is contained in:
getdls 2018-01-21 22:10:15 +01:00
parent 3c2bc2cbc2
commit 29322c144e
4 changed files with 149 additions and 57 deletions

View File

@ -4,9 +4,8 @@
// shader 8c1e55fd967b0496
// 1/4 -> 1/16 bloom pyramid . Pixelated unless scaled but still needs blur for light bleed..
// To-do. Check if screen res is * samples stable
const float resScale = 4.0;
//const int sampleScale = 1;
//const float resScale = 4.0;
const float resScale = <?=$scaleFactorX?>;
const float lightBloom = 0.95;
highp float lineRand(vec2 co)
{
highp float a = 12.9898;
@ -25,7 +24,7 @@ uniform vec2 uf_fragCoordScale;
// FabriceNeyret2, single pass gaussian by intermediate MIPmap level. https://www.shadertoy.com/view/ltScRG
// I hereby pledge my loyalty to the FabriceNeyret2 fanclub, this is bloody beautiful!
const int samples = 8, //check if must scale to pascal levels
const int samples = 16, //check if must scale to pascal levels
LOD = 2, // gaussian done on MIPmap at scale LOD
sLOD = 1 << LOD; // tile size = 2^LOD
const float sigma = float(samples) * .25;
@ -104,7 +103,7 @@ void main()
vec2 uv = coord * ps;
R4f.xyz = blur(textureUnitPS0, uv, ps).xyz;
//R4f.xyz = (texture(textureUnitPS0, R1f.xy).xyz);
R4f.xyz += (texture(textureUnitPS0, R1f.xy).xyz)/2;
R3f.xyz = (texture(textureUnitPS0, R0f.zw).xyz);
R2f.xyz = (texture(textureUnitPS0, R2f.xy).xyz);// prob?
R1f.xyz = (texture(textureUnitPS0, R1f.zw).xyz);
@ -173,11 +172,11 @@ void main()
PV1f.w = R127f.w;
// 6
PV0f.x = PV1f.z + -(PV1f.w);
R5f.y = (PV1f.y * 0.30 + R127f.x);//degree of bloom
R5f.x = (PV1f.x * 0.30 + R127f.z);
R5f.y = (PV1f.y * 0.275 + R127f.x)*lightBloom;//degree of bloom
R5f.x = (PV1f.x * 0.275 + R127f.z)*lightBloom;
PS0f = R5f.x;
// 7
R5f.z = (PV0f.x * 0.30 + R127f.w);
R5f.z = (PV0f.x * 0.275 + R127f.w)*lightBloom;
// export
passPixelColor0 = vec4(R5f.x, R5f.y, R5f.z, R5f.w);
}

View File

@ -32,6 +32,20 @@ tileModesExcluded = 0x001
overwriteWidth = <?=round($scaleFactorX*1280)?>
overwriteHeight = <?=round($scaleFactorY*720)?>
[TextureRedefine] #XCX shadow
width = 1024
height = 1024
formats = 0x005
overwriteWidth = <?=round($scaleFactorX*1024)?>
overwriteHeight = <?=round($scaleFactorY*1024)?>
[TextureRedefine] # Gear menu
width = 1024
height = 720
formatsExcluded = 0x001 #in game movies, stasis
overwriteWidth = <?=round($scaleFactorX*1024)?>
overwriteHeight = <?=round($scaleFactorY*720)?>
[TextureRedefine] # Do not remove, must be upscaled with same factor as TV or probe view breaks
width = 854
height = 480
@ -46,26 +60,12 @@ tileModesExcluded = 0x001
overwriteWidth = <?=round($scaleFactorX*640)?>
overwriteHeight = <?=round($scaleFactorY*360)?>
[TextureRedefine] # q-res alpha (Previously not added due to potential conflict, please remove rule when using Xeno GCN4 workaround)
width = 320
height = 180
overwriteWidth = <?=round($scaleFactorX*320)?>
overwriteHeight = <?=round($scaleFactorY*180)?>
[TextureRedefine] # Gear menu
width = 1024
height = 720
formatsExcluded = 0x001 #in game movies, stasis
[TextureRedefine] #XCX Dynamic shadow scale both same for smoother transitions
width = 512
height = 512
formats = 0x005
overwriteWidth = <?=round($scaleFactorX*1024)?>
overwriteHeight = <?=round($scaleFactorY*720)?>
[TextureRedefine] # Fog
width = 426
height = 240
overwriteWidth = <?=round($scaleFactorX*426)?>
overwriteHeight = <?=round($scaleFactorY*240)?>
// vvvv credits to Getdls & GITech vvvv //
overwriteHeight = <?=round($scaleFactorY*1024)?>
[TextureRedefine] # Sun, Light Sources (plants, armor etc)
width = 512
@ -73,19 +73,77 @@ height = 288
overwriteWidth = <?=round($scaleFactorX*512)?>
overwriteHeight = <?=round($scaleFactorY*288)?>
[TextureRedefine] # Fog
width = 426
height = 240
overwriteWidth = <?=round($scaleFactorX*426)?>
overwriteHeight = <?=round($scaleFactorY*240)?>
[TextureRedefine] # q-res alpha (Previously not added due to potential conflict, please remove rule when using Xeno GCN4 workaround)
width = 320
height = 180
overwriteWidth = <?=round($scaleFactorX*320)?>
overwriteHeight = <?=round($scaleFactorY*180)?>
[TextureRedefine]
width = 261
height = 223
#formatsExcluded =
overwriteWidth = <?=round($scaleFactorX*261)?>
overwriteHeight = <?=round($scaleFactorY*223)?>
[TextureRedefine]
width = 256
height = 180
#formatsExcluded =
overwriteWidth = <?=round($scaleFactorX*256)?>
overwriteHeight = <?=round($scaleFactorY*180)?>
[TextureRedefine] # "God rays" stencil res, lens reflections.
width = 256
height = 144
overwriteWidth = <?=round($scaleFactorX*256)?>
overwriteHeight = <?=round($scaleFactorY*144)?>
[TextureRedefine]# Probe glow. Does not increase sample amount, only scales up
#[TextureRedefine] # lod switch dithering, don't scale
#width = 256
#height = 8
#formats = 0x01a # verify not to scale.
#[TextureRedefine] # lod switch dithering, don't scale
#width = 256
#height = 4
#formats = 0x01a # verify not to scale.
[TextureRedefine] #
width = 255
height = 255
formats = 0x01a,0x810 # verify later
overwriteWidth = <?=round($scaleFactorX*255)?>
overwriteHeight = <?=round($scaleFactorY*255)?>
[TextureRedefine]# Probe glow.
width = 160
height = 90
#formatsExcluded = 0x816 #fixed in shader
overwriteWidth = <?=round($scaleFactorX*160)?>
overwriteHeight = <?=round($scaleFactorY*90)?>
[TextureRedefine]
width = 128
height = 128
formats = 0x806
overwriteWidth = <?=round($scaleFactorX*128)?>
overwriteHeight = <?=round($scaleFactorY*128)?>
[TextureRedefine]
width = 128
height = 90
#formatsExcluded =
overwriteWidth = <?=round($scaleFactorX*128)?>
overwriteHeight = <?=round($scaleFactorY*90)?>
[TextureRedefine]# should up-scale from 35 to keep aligment with other 16:9 buffers
width = 80
height = 46
@ -93,16 +151,51 @@ height = 46
overwriteWidth = <?=round($scaleFactorX*80)?>
overwriteHeight = <?=round($scaleFactorY*45)?>
[TextureRedefine] #XCX shadow
width = 1024
height = 1024
formats = 0x005
overwriteWidth = <?=round($scaleFactorX*1024)?>
overwriteHeight = <?=round($scaleFactorY*1024)?>
[TextureRedefine] #
width = 64
height = 64
formats = 0x816,0x820 #001a includes cube breaks if scaled
overwriteWidth = <?=round($scaleFactorX*64)?>
overwriteHeight = <?=round($scaleFactorY*64)?>
[TextureRedefine] #XCX Dynamic shadow scale both same for smoother transitions
width = 512
height = 512
formats = 0x005
overwriteWidth = <?=round($scaleFactorX*1024)?>
overwriteHeight = <?=round($scaleFactorY*1024)?>
[TextureRedefine]
width = 64
height = 46
#formatsExcluded =
overwriteWidth = <?=round($scaleFactorX*64)?>
overwriteHeight = <?=round($scaleFactorY*46)?>
[TextureRedefine] #
height = 32
height = 32
formats = 0x806 #001a includes cube breaks flashlight scene
overwriteWidth = <?=round($scaleFactorX*32)?>
overwriteHeight = <?=round($scaleFactorY*32)?>
#[TextureRedefine] #grading don't scale
#width = 16
#height = 16
#formatsExcluded =
#overwriteWidth = 16
#overwriteHeight = 16
[TextureRedefine] #
width = 8
height = 8
formats = 0x806
overwriteWidth = <?=round($scaleFactorX*8)?>
overwriteHeight = <?=round($scaleFactorY*8)?>
[TextureRedefine] #
width = 4
height = 4
formats = 0x80e,0x81e #R16,RG16
overwriteWidth = <?=round($scaleFactorX*4)?>
overwriteHeight = <?=round($scaleFactorY*4)?>
[TextureRedefine] #
width = 1
height = 1
formats = 0x008,0x01a,081e
overwriteWidth = <?=round($scaleFactorX*1)?>
overwriteHeight = <?=round($scaleFactorY*1)?>

View File

@ -4,7 +4,7 @@
// To-do, .5 is daylight and 1.0 night is wiiu "correct" for nvidia
// changes here in turn "breaks" bloom as they over or under expose depending on day/night
const float preExposure = 0.75; // old brigntess tweak. Truncates at around .45+
const float preExposure = 0.65; // old brigntess tweak. Truncates at around .45+
const float gammaPostExposure = 0.95; // compensate pre exposure, but loss of contrast when positive.
uniform ivec4 uf_remappedPS[1];

View File

@ -4,7 +4,7 @@
// cross fade brightness
// To-do, .5 is daylight and 1.0 night is wiiu "correct" for nvidia
// changes here in turn "breaks" bloom as they over or under expose depending on day/night
const float preExposure = 0.75; // old brigntess tweak. Truncates at around .45+
const float preExposure = 0.65; // old brigntess tweak. Truncates at around .45+
const float gammaPostExposure = 0.95; // compensate pre exposure, but loss of contrast when positive.
uniform ivec4 uf_remappedPS[1];