导航菜单

页面标题

页面副标题

Kreate v1.5.0 - GlossyGradients.java 源代码

正在查看: Kreate v1.5.0 应用的 GlossyGradients.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mikepenz.hypnoticcanvas.shaders;

import com.mikepenz.hypnoticcanvas.RuntimeEffect;
import com.mikepenz.hypnoticcanvas.shaders.Shader;
import kotlin.Metadata;

@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u000f\bÇ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u0014\u0010\u0004\u001a\u00020\u00058VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0006\u0010\u0007R\u0014\u0010\b\u001a\u00020\u00058VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\t\u0010\u0007R\u0014\u0010\n\u001a\u00020\u00058VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u000b\u0010\u0007R\u0014\u0010\f\u001a\u00020\u00058VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\r\u0010\u0007R\u0014\u0010\u000e\u001a\u00020\u00058VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u0007R\u0014\u0010\u0010\u001a\u00020\u00058VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0011\u0010\u0007R\u0014\u0010\u0012\u001a\u00020\u0005X\u0096D¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0007¨\u0006\u0014"}, d2 = {"Lcom/mikepenz/hypnoticcanvas/shaders/GlossyGradients;", "Lcom/mikepenz/hypnoticcanvas/shaders/Shader;", "<init>", "()V", "name", "", "getName", "()Ljava/lang/String;", "authorName", "getAuthorName", "authorUrl", "getAuthorUrl", "credit", "getCredit", "license", "getLicense", "licenseUrl", "getLicenseUrl", "sksl", "getSksl", "hypnoticcanvas_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class GlossyGradients implements Shader {
    public static final int $stable = 0;
    public static final GlossyGradients INSTANCE = new GlossyGradients();
    private static final String sksl = "\n// The MIT License\n// Copyright © 2024 Giorgi Azmaipharashvili\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nuniform float uTime;\nuniform vec3 uResolution;\n\nvec4 main( vec2 fragCoord )\n{\n    float mr = min(uResolution.x, uResolution.y);\n    vec2 uv = (fragCoord * 2.0 - uResolution.xy) / mr;\n\n    float d = -uTime * 0.5;\n    float a = 0.0;\n    for (float i = 0.0; i < 8.0; ++i) {\n        a += cos(i - d - a * uv.x);\n        d += sin(uv.y * i + a);\n    }\n    d += uTime * 0.5;\n    vec3 col = vec3(cos(uv * vec2(d, a)) * 0.6 + 0.4, cos(a + d) * 0.5 + 0.5);\n    col = cos(col * cos(vec3(d, a, 2.5)) * 0.5 + 0.5);\n    return vec4(col,1.0);\n}\n    ";

    private GlossyGradients() {
    }

    @Override
    public void applyUniforms(RuntimeEffect runtimeEffect, float f, float f2, float f3) {
        Shader.DefaultImpls.applyUniforms(this, runtimeEffect, f, f2, f3);
    }

    @Override
    public float getSpeedModifier() {
        return Shader.DefaultImpls.getSpeedModifier(this);
    }

    @Override
    public String getName() {
        return "GlossyGradients";
    }

    @Override
    public String getAuthorName() {
        return "Giorgi Azmaipharashvili";
    }

    @Override
    public String getAuthorUrl() {
        return "https://www.shadertoy.com/user/Peace";
    }

    @Override
    public String getCredit() {
        return "https://www.shadertoy.com/view/lX2GDR";
    }

    @Override
    public String getLicense() {
        return "MIT License";
    }

    @Override
    public String getLicenseUrl() {
        return "https://opensource.org/license/mit";
    }

    @Override
    public String getSksl() {
        return sksl;
    }
}