/*
 * Decompiled with CFR 0.152.
 */
package meteordevelopment.meteorclient.utils.render.postprocess;

import meteordevelopment.meteorclient.renderer.MeshRenderer;
import meteordevelopment.meteorclient.renderer.MeteorRenderPipelines;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.render.StorageESP;
import meteordevelopment.meteorclient.utils.render.postprocess.OutlineUniforms;
import meteordevelopment.meteorclient.utils.render.postprocess.PostProcessShader;

public class StorageOutlineShader
extends PostProcessShader {
    private static StorageESP storageESP;

    public StorageOutlineShader() {
        super(MeteorRenderPipelines.POST_OUTLINE);
    }

    @Override
    protected boolean shouldDraw() {
        if (storageESP == null) {
            storageESP = Modules.get().get(StorageESP.class);
        }
        return storageESP.isShader();
    }

    @Override
    protected void setupPass(MeshRenderer renderer) {
        renderer.uniform("OutlineData", OutlineUniforms.write(StorageOutlineShader.storageESP.outlineWidth.get(), (float)StorageOutlineShader.storageESP.fillOpacity.get().intValue() / 255.0f, StorageOutlineShader.storageESP.shapeMode.get().ordinal(), StorageOutlineShader.storageESP.glowMultiplier.get().floatValue()));
    }
}

