package com.pixelized.desktop.lwa.ui.shaders.packs

import com.mikepenz.hypnoticcanvas.shaders.Shader

data object GoldenFlow : Shader {
    override val name: String
        get() = ""
    override val authorName: String
        get() = ""
    override val authorUrl: String
        get() = ""
    override val credit: String
        get() = ""
    override val license: String
        get() = ""
    override val licenseUrl: String
        get() = ""

    override val sksl: String
        get() = """
uniform float uTime;
uniform vec3 uResolution;

vec4 main(vec2 fragCoord) {
    vec2 q = 7.0 * (fragCoord.xy - 0.5 * uResolution.xy) / max(uResolution.x, uResolution.y);
    
    float i = 1.0;
    for(int iter = 0; iter < 40; iter++)
    {
        vec2 o = q;
        o.x += (0.5 / i) * cos(i * q.y + uTime * 0.297 + 0.03 * i) + 1.3;        
        o.y += (0.5 / i) * cos(i * q.x + uTime * 0.414 + 0.03 * (i + 10.0)) + 1.9;
        q = o;
        i *= 1.1;
    }
    
    vec3 col = vec3(0.5 * sin(3.0 * q.x) + 0.5, 0.5 * sin(3.0 * q.y) + 0.5, sin(1.3 * q.x + 1.7 * q.y));
    float f = 0.43 * (col.x + col.y + col.z);
    
    return vec4(f + 0.6, 0.2 + 0.75 * f, 0.2, 0.5);
}
""".trimIndent()
}