package org.chrisoft.trashyaddon.misc; import meteordevelopment.meteorclient.systems.modules.Modules; import meteordevelopment.meteorclient.systems.modules.render.ESP; import meteordevelopment.meteorclient.utils.render.postprocess.EntityShader; import net.minecraft.entity.Entity; import org.chrisoft.trashyaddon.commands.EntityHighlightCommand; public class AddonEntityOutlineShader extends EntityShader { private static ESP esp; public AddonEntityOutlineShader() { init("outline"); } @Override protected boolean shouldDraw() { if (esp == null) esp = Modules.get().get(ESP.class); //return esp.isShader(); return true; } @Override public void endRender() { super.endRender(); } @Override public boolean shouldDraw(Entity entity) { if (!shouldDraw()) return false; return EntityHighlightCommand.getEntityColor(entity) != null; } @Override protected void setUniforms() { shader.set("u_Width", esp.outlineWidth.get()); shader.set("u_FillOpacity", esp.fillOpacity.get()); shader.set("u_ShapeMode", esp.shapeMode.get().ordinal()); shader.set("u_GlowMultiplier", esp.glowMultiplier.get()); } }