Skip to content

Commit

Permalink
[Botw] DOF masking fix, AA v2 commit, perf scaling fix
Browse files Browse the repository at this point in the history
Add - AA v2, no error comments so foar so should be safe to commit
Fix  - DOF masking (blur effects) w/o breaking bloom  by only scaling
depth for 320, 160, 80
Fix - Light breaking due to perf scaling not being scaled to TV res
  • Loading branch information
getdls committed Apr 14, 2017
1 parent 79b2012 commit 693778d
Show file tree
Hide file tree
Showing 8 changed files with 830 additions and 81 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#version 400
#extension GL_ARB_texture_gather : enable
const float bloomFactor = 1.0; // bloom strength, just for debug purposes.
const float contrastFactor = 1.0; // 1.05 increases contrast for screenshots etc, will crush black levels in dark areas.
// shader b650afd18c646005 // BOTW AA removal
uniform ivec4 uf_remappedPS[4];
uniform sampler2D textureUnitPS0;// Tex0 addr 0xf4713800 res 1280x720x1 dim 1 tm: 4 format 0019 compSel: 0 1 2 3 mipView: 0x0 (num 0x1) sliceView: 0x0 (num 0x1) Sampler0 ClampX/Y/Z: 2 2 2 border: 1
Expand Down Expand Up @@ -43,7 +45,8 @@ activeMaskStackC[1] = true;
vec3 cubeMapSTM;
int cubeMapFaceId;
R0f = passParameter0;
vec4 colour = (texture(textureUnitPS0, R0f.xy).xyzw *bloomFactor);
vec3 contrastFactored = (colour.xyz - 0.5) * contrastFactor + 0.5;

R2f.xyzw = (texture(textureUnitPS0, R0f.xy).xyzw);
passPixelColor0 = vec4(R2f.x, R2f.y, R2f.z, R2f.w);
passPixelColor0 = vec4(contrastFactored.x, contrastFactored.y, contrastFactored.z, colour.w);
}
34 changes: 18 additions & 16 deletions Enthusiast/BreathOfTheWild_2880p/rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ height = 608
overwriteWidth = 5120
overwriteHeight = 2432

[TextureRedefine] #TV4
[TextureRedefine] #TV4
width = 1152
height = 648
overwriteWidth = 4608
overwriteHeight = 2592
overwriteWidth = 5120 #Scale to TV, not performance target
overwriteHeight = 2880

[TextureRedefine] #half-res1
width = 640
Expand All @@ -45,12 +45,12 @@ height = 288
overwriteWidth = 2560
overwriteHeight = 1152

#[TextureRedefine] #q-res1
#width = 320
#height = 180
#formatsExcluded = 0x01a #0x816 doesn't cooperate, bloom is entirely missing in-game
#overwriteWidth = 1280
#overwriteHeight = 720
[TextureRedefine] #q-res1
width = 320
height = 180
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 1280
overwriteHeight = 720

#[TextureRedefine] #q-res2
#width = 320
Expand All @@ -64,17 +64,19 @@ overwriteHeight = 1152
#overwriteWidth = 1280
#overwriteHeight = 576

#[TextureRedefine] #o-res1
#width = 160
#height = 90
#overwriteWidth = 720
#overwriteHeight = 360
[TextureRedefine] #o-res1
width = 160
height = 90
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 720
overwriteHeight = 360

[TextureRedefine] # O
width = 80
height = 45
overwriteWidth = 321
overwriteHeight = 181
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 320
overwriteHeight = 180

[TextureRedefine] # M
width = 80
Expand Down
28 changes: 15 additions & 13 deletions Enthusiast/BreathOfTheWild_4320p/rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ overwriteHeight = 3648
[TextureRedefine] #TV4
width = 1152
height = 648
overwriteWidth = 6912
overwriteHeight = 3888
overwriteWidth = 7680 #Scale to TV, not performance target
overwriteHeight = 4320

[TextureRedefine] #half-res1
width = 640
Expand All @@ -45,12 +45,12 @@ height = 288
overwriteWidth = 3840
overwriteHeight = 1728

#[TextureRedefine] #q-res1
#width = 320
#height = 180
#formatsExcluded = 0x01a #0x816 doesn't cooperate, bloom is entirely missing in-game
#overwriteWidth = 1920
#overwriteHeight = 1080
[TextureRedefine] #q-res1
width = 320
height = 180
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 1920
overwriteHeight = 1080

#[TextureRedefine] #q-res2
#width = 320
Expand All @@ -64,14 +64,16 @@ overwriteHeight = 1728
#overwriteWidth = 1920
#overwriteHeight = 864

#[TextureRedefine] #o-res1
#width = 160
#height = 90
#overwriteWidth = 960
#overwriteHeight = 540
[TextureRedefine] #o-res1
width = 160
height = 90
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 960
overwriteHeight = 540

[TextureRedefine] # O
width = 80
formats = 0x001 #Scale depth masking, not bloom
height = 45
overwriteWidth = 480
overwriteHeight = 270
Expand Down
28 changes: 15 additions & 13 deletions Enthusiast/BreathOfTheWild_5760p/rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ overwriteHeight = 4864
[TextureRedefine] #TV4
width = 1152
height = 648
overwriteWidth = 9216
overwriteHeight = 5184
overwriteWidth = 10240 #Scale to TV, not performance target
overwriteHeight = 5760

[TextureRedefine] #half-res1
width = 640
Expand All @@ -45,12 +45,12 @@ height = 288
overwriteWidth = 5120
overwriteHeight = 2304

#[TextureRedefine] #q-res1
#width = 320
#height = 180
#formatsExcluded = 0x01a #0x816 doesn't cooperate, bloom is entirely missing in-game
#overwriteWidth = 2560
#overwriteHeight = 1440
[TextureRedefine] #q-res1
width = 320
height = 180
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 2560
overwriteHeight = 1440

#[TextureRedefine] #q-res2
#width = 320
Expand All @@ -64,15 +64,17 @@ overwriteHeight = 2304
#overwriteWidth = 2560
#overwriteHeight = 1152

#[TextureRedefine] #o-res1
#width = 160
#height = 90
#overwriteWidth = 1281
#overwriteHeight = 721
[TextureRedefine] #o-res1
width = 160
height = 90
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 1281
overwriteHeight = 721

[TextureRedefine] # O
width = 80
height = 45
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 640
overwriteHeight = 360

Expand Down
24 changes: 13 additions & 11 deletions Quality/BreathOfTheWild_1080p/rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ height = 288
overwriteWidth = 960
overwriteHeight = 432

#[TextureRedefine] #q-res1
#width = 320
#height = 180
#formatsExcluded = 0x01a #0x816 doesn't cooperate, bloom is entirely missing in-game
#overwriteWidth = 480
#overwriteHeight = 270
[TextureRedefine] #q-res1
width = 320
height = 180
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 480
overwriteHeight = 270

#[TextureRedefine] #q-res2
#width = 320
Expand All @@ -64,14 +64,16 @@ overwriteHeight = 432
#overwriteWidth = 480
#overwriteHeight = 216

#[TextureRedefine] #o-res1
#width = 160
#height = 90
#overwriteWidth = 240
#overwriteHeight = 135
[TextureRedefine] #o-res1
width = 160
height = 90
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 240
overwriteHeight = 135

[TextureRedefine] # O
width = 80
formats = 0x001 #Scale depth masking, not bloom
height = 45
overwriteWidth = 120
overwriteHeight = 68
Expand Down
28 changes: 15 additions & 13 deletions Quality/BreathOfTheWild_1440p/rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ overwriteHeight = 1216
[TextureRedefine] #TV4
width = 1152
height = 648
overwriteWidth = 2304
overwriteHeight = 1296
overwriteWidth = 2560 #Scale to TV, not performance target
overwriteHeight = 1440

[TextureRedefine] #half-res1
width = 640
Expand All @@ -45,12 +45,12 @@ height = 288
overwriteWidth = 1280
overwriteHeight = 576

#[TextureRedefine] #q-res1, main bloom, AO
#width = 320
#height = 180
#formatsExcluded = 0x01a #0x816 doesn't cooperate, bloom is entirely missing in-game
#overwriteWidth = 640
#overwriteHeight = 360
[TextureRedefine] #q-res1, main bloom, AO
width = 320
height = 180
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 640
overwriteHeight = 360

#[TextureRedefine] #q-res2
#width = 320
Expand All @@ -64,15 +64,17 @@ overwriteHeight = 576
#overwriteWidth = 641
#overwriteHeight = 289

#[TextureRedefine] #o-res1
#width = 160
#height = 90
#overwriteWidth = 320
#overwriteHeight = 180
[TextureRedefine] #o-res1
width = 160
height = 90
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 320
overwriteHeight = 180

[TextureRedefine] # O
width = 80
height = 45
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 160
overwriteHeight = 91

Expand Down
28 changes: 15 additions & 13 deletions Quality/BreathOfTheWild_2160p/rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ overwriteHeight = 1824
[TextureRedefine] #TV4
width = 1152
height = 648
overwriteWidth = 3456
overwriteHeight = 1944
overwriteWidth = 3840 #Scale to TV, not performance target
overwriteHeight = 2160

[TextureRedefine] #half-res1, soft pass toon shader,
width = 640
Expand All @@ -45,12 +45,12 @@ height = 288
overwriteWidth = 1920
overwriteHeight = 864

#[TextureRedefine] #q-res1 Main bloom pass, AO
#width = 320
#height = 180
#formatsExcluded = 0x01a #0x816 doesn't cooperate, bloom is entirely missing in-game
#overwriteWidth = 960
#overwriteHeight = 540
[TextureRedefine] #q-res1 Main bloom pass, AO
width = 320
height = 180
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 960
overwriteHeight = 540

#[TextureRedefine] #q-res2
#width = 320
Expand All @@ -64,15 +64,17 @@ overwriteHeight = 864
#overwriteWidth = 960
#overwriteHeight = 432

#[TextureRedefine] #o-res1
#width = 160
#height = 90
#overwriteWidth = 480
#overwriteHeight = 270
[TextureRedefine] #o-res1
width = 160
height = 90
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 480
overwriteHeight = 270

[TextureRedefine] # O
width = 80
height = 45
formats = 0x001 #Scale depth masking, not bloom
overwriteWidth = 240
overwriteHeight = 135

Expand Down

0 comments on commit 693778d

Please sign in to comment.