Skip to content

Commit

Permalink
perf: 优化更多效果
Browse files Browse the repository at this point in the history
  • Loading branch information
Blinue committed Jan 13, 2025
1 parent 3fba18c commit 5715d19
Show file tree
Hide file tree
Showing 3 changed files with 759 additions and 775 deletions.
6 changes: 3 additions & 3 deletions src/Effects/CuNNy/CuNNy-16x16C-NVL.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Texture2D t7;
//!IN INPUT
//!OUT t0, t1, t2, t3

#define l0(x, y) MF((dot(float3(6.280e-01, 1.208e+00, 2.567e-01), O(INPUT, float2(x, y)).rgb) + -3.744e-01))
#define l0(x, y) (dot(MF3(6.280e-01, 1.208e+00, 2.567e-01), O(INPUT, float2(x, y)).rgb) + MF(-3.744e-01))

V4 f0(MF s0_0, MF s0_1, MF s0_2, MF s0_3, MF s0_4, MF s0_5, MF s0_6, MF s0_7, MF s0_8) {
V4 r = { 7.451e-03, 5.332e-03, 9.656e-03, -1.242e-02 };
Expand Down Expand Up @@ -7545,8 +7545,8 @@ void Pass18(uint2 blockStart, uint3 tid) {

V4 r = f0(s0_0, s0_1, s0_2, s0_3, s0_4, s0_5, s0_6, s0_7, s0_8, s1_0, s1_1, s1_2, s1_3, s1_4, s1_5, s1_6, s1_7, s1_8, s2_0, s2_1, s2_2, s2_3, s2_4, s2_5, s2_6, s2_7, s2_8, s3_0, s3_1, s3_2, s3_3, s3_4, s3_5, s3_6, s3_7, s3_8, s4_0, s4_1, s4_2, s4_3, s4_4, s4_5, s4_6, s4_7, s4_8, s5_0, s5_1, s5_2, s5_3, s5_4, s5_5, s5_6, s5_7, s5_8, s6_0, s6_1, s6_2, s6_3, s6_4, s6_5, s6_6, s6_7, s6_8, s7_0, s7_1, s7_2, s7_3, s7_4, s7_5, s7_6, s7_7, s7_8);

static const MF3x3 rgb2yuv = {0.299, 0.587, 0.114, -0.169, -0.331, 0.5, 0.5, -0.419, -0.081};
static const MF3x3 yuv2rgb = {1, -0.00093, 1.401687, 1, -0.3437, -0.71417, 1, 1.77216, 0.00099};
static const MF3x3 rgb2yuv = { 0.299, 0.587, 0.114, -0.169, -0.331, 0.5, 0.5, -0.419, -0.081 };
static const MF3x3 yuv2rgb = { 1, -0.00093, 1.401687, 1, -0.3437, -0.71417, 1, 1.77216, 0.00099 };
float2 opt = float2(GetOutputPt());

pos -= 0.5f * opt;
Expand Down
Loading

0 comments on commit 5715d19

Please sign in to comment.