18// Source: @notargs https://twitter.com/notargs/status/1250468645030858753
19uniform half4 iResolution;
25 p.xy *= mat2(cos(a), sin(a), -sin(a), cos(a));
26 return .1 - length(cos(p.xy) + sin(p.yz));
29half4 main(vec2 fragcoord) {
30 vec3 d = .5 - fragcoord.xy1 / iResolution.y;
32 for (int i = 0; i < 32; i++) {
35 return ((sin(p) + vec3(2, 5, 9)) / length(p)).xyz1;
40 bool runAsBench()
const override {
return true; }
44 SkISize getISize()
override {
return {256, 256}; }
46 void onDraw(
SkCanvas* canvas)
override {
54 SkV4 iResolution = { 255, 255, 0, 0 };
55 auto shader =
result.effect->makeShader(
58 p.setShader(std::move(shader));
#define SkASSERTF(cond, fmt,...)
void drawRect(const SkRect &rect, const SkPaint &paint)
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
SkMatrix & setRotate(SkScalar degrees, SkScalar px, SkScalar py)
static Result MakeForShader(SkString sksl, const Options &)
static const char * RUNTIME_FUNCTIONS_SRC