enough to try out

    color.rgb = color.rgb + a*(sin(6.28*color.rgb)*0.159);

Change-Id: I45dbabb7f2a58aeebac4a651ed45b28ea90f9dd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286059
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Mike Klein 2020-04-29 09:02:55 -05:00 committed by Skia Commit-Bot
parent cfdc07aa0e
commit 5be739bf4c

View File

@ -523,6 +523,32 @@ static std::vector<skvm::F32> program_fn(skvm::Builder* p,
push(a*x);
} break;
case Inst::kSin: {
skvm::F32 x = pop();
push(approx_sin(x));
} break;
case Inst::kSin2: {
skvm::F32 x = pop(), y = pop();
push(approx_sin(y));
push(approx_sin(x));
} break;
case Inst::kSin3: {
skvm::F32 x = pop(), y = pop(), z = pop();
push(approx_sin(z));
push(approx_sin(y));
push(approx_sin(x));
} break;
case Inst::kSin4: {
skvm::F32 x = pop(), y = pop(), z = pop(), w = pop();
push(approx_sin(w));
push(approx_sin(z));
push(approx_sin(y));
push(approx_sin(x));
} break;
// Baby steps... just leaving test conditions on the stack for now.
case Inst::kMaskPush: break;
case Inst::kMaskNegate: break;