Skip to content

Commit

Permalink
Fix depth-to-space error in upscale shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
bloc97 committed Aug 10, 2021
1 parent e35062e commit 28535a4
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions glsl/Upscale+Denoise/Anime4K_Upscale_Denoise_CNN_x2_L.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,11 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-Denoise-CNN-x2-(L)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!BIND conv2d_last_tf1
//!BIND conv2d_last_tf2
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -457,5 +457,5 @@ vec4 hook() {
ivec2 i2 = ivec2(f2 * vec2(2.0));
float c2 = conv2d_last_tf2_tex((vec2(0.5) - f2) * conv2d_last_tf2_pt + conv2d_last_tf2_pos)[i2.y * 2 + i2.x];
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale+Denoise/Anime4K_Upscale_Denoise_CNN_x2_M.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-Denoise-CNN-x2-(M)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -296,5 +296,5 @@ vec4 hook() {
float c1 = c0;
float c2 = c1;
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale+Denoise/Anime4K_Upscale_Denoise_CNN_x2_S.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-Denoise-CNN-x2-(S)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -154,5 +154,5 @@ vec4 hook() {
float c1 = c0;
float c2 = c1;
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale+Denoise/Anime4K_Upscale_Denoise_CNN_x2_UL.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -1679,11 +1679,11 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-Denoise-CNN-x2-(UL)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!BIND conv2d_last_tf1
//!BIND conv2d_last_tf2
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -1698,5 +1698,5 @@ vec4 hook() {
ivec2 i2 = ivec2(f2 * vec2(2.0));
float c2 = conv2d_last_tf2_tex((vec2(0.5) - f2) * conv2d_last_tf2_pt + conv2d_last_tf2_pos)[i2.y * 2 + i2.x];
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale+Denoise/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,11 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-Denoise-CNN-x2-(VL)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!BIND conv2d_last_tf1
//!BIND conv2d_last_tf2
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -965,5 +965,5 @@ vec4 hook() {
ivec2 i2 = ivec2(f2 * vec2(2.0));
float c2 = conv2d_last_tf2_tex((vec2(0.5) - f2) * conv2d_last_tf2_pt + conv2d_last_tf2_pos)[i2.y * 2 + i2.x];
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale/Anime4K_Upscale_CNN_x2_L.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,11 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-CNN-x2-(L)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!BIND conv2d_last_tf1
//!BIND conv2d_last_tf2
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -457,5 +457,5 @@ vec4 hook() {
ivec2 i2 = ivec2(f2 * vec2(2.0));
float c2 = conv2d_last_tf2_tex((vec2(0.5) - f2) * conv2d_last_tf2_pt + conv2d_last_tf2_pos)[i2.y * 2 + i2.x];
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale/Anime4K_Upscale_CNN_x2_M.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-CNN-x2-(M)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -296,5 +296,5 @@ vec4 hook() {
float c1 = c0;
float c2 = c1;
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale/Anime4K_Upscale_CNN_x2_S.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-CNN-x2-(S)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -154,5 +154,5 @@ vec4 hook() {
float c1 = c0;
float c2 = c1;
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale/Anime4K_Upscale_CNN_x2_UL.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -1679,11 +1679,11 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-CNN-x2-(UL)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!BIND conv2d_last_tf1
//!BIND conv2d_last_tf2
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -1698,5 +1698,5 @@ vec4 hook() {
ivec2 i2 = ivec2(f2 * vec2(2.0));
float c2 = conv2d_last_tf2_tex((vec2(0.5) - f2) * conv2d_last_tf2_pt + conv2d_last_tf2_pos)[i2.y * 2 + i2.x];
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}
6 changes: 3 additions & 3 deletions glsl/Upscale/Anime4K_Upscale_CNN_x2_VL.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,11 @@ vec4 hook() {
}
//!DESC Anime4K-v3.2-Upscale-CNN-x2-(VL)-Depth-to-Space
//!HOOK MAIN
//!BIND MAIN
//!BIND conv2d_last_tf
//!BIND conv2d_last_tf1
//!BIND conv2d_last_tf2
//!SAVE depth_to_space2_tf
//!COMPONENTS 4
//!SAVE MAIN
//!WIDTH conv2d_last_tf.w 2 *
//!HEIGHT conv2d_last_tf.h 2 *
//!WHEN OUTPUT.w MAIN.w / 1.200 > OUTPUT.h MAIN.h / 1.200 > *
Expand All @@ -965,5 +965,5 @@ vec4 hook() {
ivec2 i2 = ivec2(f2 * vec2(2.0));
float c2 = conv2d_last_tf2_tex((vec2(0.5) - f2) * conv2d_last_tf2_pt + conv2d_last_tf2_pos)[i2.y * 2 + i2.x];
float c3 = c2;
return vec4(c0, c1, c2, c3);
return vec4(c0, c1, c2, c3) + MAIN_tex(MAIN_pos);
}

0 comments on commit 28535a4

Please sign in to comment.