Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Визуальная часть Zenith Recode | Target Esp Гирлянда 3D

это я взял со своих сурсов. Ливаю с этой уебещной базы, решил слить такие прикольные таргет есп все ихсходники у @Sanch3zs без EntytiEsp они смотрятся красиво а так пиздатые думаю.

ss:
Посмотреть вложение 324021
сам код

Код:
Expand Collapse Copy
private void renderGarland(EventRender3D event) {
float anim = this.animationProgress;
if (anim <= 0.0F) return;

LivingEntity entityToRender = this.target != null ? this.target : this.lastTarget;
if (entityToRender == null) return;

    MatrixStack ms = event.getMatrix();
Camera camera = mc.gameRenderer.getCamera();
Vec3d targetPos = MathUtil.interpolate(entityToRender);

double renderX = targetPos.x - camera.getPos().x;
double renderY = targetPos.y - camera.getPos().y;
double renderZ = targetPos.z - camera.getPos().z;

 float height = entityToRender.getHeight();
 float width = entityToRender.getWidth();
float radius = width * 1.2f;

float time = (System.currentTimeMillis() % 4000) / 4000f;
float offset = time * 360f;

int lightsCount = 30;
int spirals = 3;

    ms.push();
    ms.translate(renderX, renderY, renderZ);

RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.disableCull();

if (throughWalls.isEnabled()) {
RenderSystem.disableDepthTest();
RenderSystem.depthMask(false);
} else {
RenderSystem.enableDepthTest();
RenderSystem.depthMask(false);
    }
    RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.begin(VertexFormat.DrawMode.DEBUG_LINE_STRIP, VertexFormats.POSITION_COLOR);

int wireColor = 0xFF0B3B0B;

for (int i = 0; i <= lightsCount; i++) {
float progress = (float) i / lightsCount;
float angle = (float) Math.toRadians(offset + (progress * 360f * spirals));
float currentRadius = radius * (1.0f - (progress * 0.6f));
float x = (float) Math.cos(angle) * currentRadius;
float z = (float) Math.sin(angle) * currentRadius;
 float y = progress * height;

int color = ColorUtil.multAlpha(wireColor, anim);
int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
int a = (color >> 24) & 0xFF;

        buffer.vertex(ms.peek().getPositionMatrix(), x, y, z).color(r, g, b, a);
    }
BufferRenderer.drawWithGlobalProgram(buffer.end());
    RenderSystem.setShader(ShaderProgramKeys.POSITION_TEX_COLOR);
RenderSystem.setShaderTexture(0, bloom);
RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE);

BufferBuilder bulbBuffer = tessellator.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR);

 float pitch = camera.getPitch();
 float yaw = camera.getYaw();

for (int i = 0; i <= lightsCount; i++) {
float progress = (float) i / lightsCount;
float angle = (float) Math.toRadians(offset + (progress * 360f * spirals));
float currentRadius = radius * (1.0f - (progress * 0.6f));
float x = (float) Math.cos(angle) * currentRadius;
float z = (float) Math.sin(angle) * currentRadius;
 float y = progress * height;

float size = 0.15f * easeOutCubic(anim);
float twinkle = (float) Math.sin((System.currentTimeMillis() / 100.0) + i) * 0.2f + 0.8f;
 float alpha = anim * twinkle;

 int color = getFestiveColor(i);
int finalColor = ColorUtil.multAlpha(color, alpha);

        drawBillboard(bulbBuffer, ms, x, y, z, size, yaw, pitch, finalColor);
    }

BufferRenderer.drawWithGlobalProgram(bulbBuffer.end());

RenderSystem.depthMask(true);
RenderSystem.disableBlend();
RenderSystem.enableCull();
    ms.pop();
}

private void drawBillboard(BufferBuilder buffer, MatrixStack ms, float x, float y, float z, float scale, float yaw, float pitch, int color) {
    ms.push();
    ms.translate(x, y, z);
ms.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-yaw));
ms.multiply(RotationAxis.POSITIVE_X.rotationDegrees(pitch));

    Matrix4f matrix = ms.peek().getPositionMatrix();

int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
int a = (color >> 24) & 0xFF;

buffer.vertex(matrix, -scale, -scale, 0).texture(0, 0).color(r, g, b, a);
buffer.vertex(matrix, -scale, scale, 0).texture(0, 1).color(r, g, b, a);
buffer.vertex(matrix, scale, scale, 0).texture(1, 1).color(r, g, b, a);
buffer.vertex(matrix, scale, -scale, 0).texture(1, 0).color(r, g, b, a);

    ms.pop();
}

private int getFestiveColor(int index) {
int type = index % 4;
 return switch (type) {
case 0 -> 0xFFFF0000;
case 1 -> 0xFFFFD700;
case 2 -> 0xFF00FF00;
case 3 -> 0xFF00BFFF;
default -> 0xFFFFFFFF;
    };
}
Гпт параша
 
pahtek я немогу принять

давай вот мой дс fr1zka01
1767801091628.png
 
это я взял со своих сурсов. Ливаю с этой уебещной базы, решил слить такие прикольные таргет есп все ихсходники у @Sanch3zs без EntytiEsp они смотрятся красиво а так пиздатые думаю.

ss:
Посмотреть вложение 324021
сам код

Код:
Expand Collapse Copy
private void renderGarland(EventRender3D event) {
float anim = this.animationProgress;
if (anim <= 0.0F) return;

LivingEntity entityToRender = this.target != null ? this.target : this.lastTarget;
if (entityToRender == null) return;

    MatrixStack ms = event.getMatrix();
Camera camera = mc.gameRenderer.getCamera();
Vec3d targetPos = MathUtil.interpolate(entityToRender);

double renderX = targetPos.x - camera.getPos().x;
double renderY = targetPos.y - camera.getPos().y;
double renderZ = targetPos.z - camera.getPos().z;

 float height = entityToRender.getHeight();
 float width = entityToRender.getWidth();
float radius = width * 1.2f;

float time = (System.currentTimeMillis() % 4000) / 4000f;
float offset = time * 360f;

int lightsCount = 30;
int spirals = 3;

    ms.push();
    ms.translate(renderX, renderY, renderZ);

RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.disableCull();

if (throughWalls.isEnabled()) {
RenderSystem.disableDepthTest();
RenderSystem.depthMask(false);
} else {
RenderSystem.enableDepthTest();
RenderSystem.depthMask(false);
    }
    RenderSystem.setShader(ShaderProgramKeys.POSITION_COLOR);
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.begin(VertexFormat.DrawMode.DEBUG_LINE_STRIP, VertexFormats.POSITION_COLOR);

int wireColor = 0xFF0B3B0B;

for (int i = 0; i <= lightsCount; i++) {
float progress = (float) i / lightsCount;
float angle = (float) Math.toRadians(offset + (progress * 360f * spirals));
float currentRadius = radius * (1.0f - (progress * 0.6f));
float x = (float) Math.cos(angle) * currentRadius;
float z = (float) Math.sin(angle) * currentRadius;
 float y = progress * height;

int color = ColorUtil.multAlpha(wireColor, anim);
int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
int a = (color >> 24) & 0xFF;

        buffer.vertex(ms.peek().getPositionMatrix(), x, y, z).color(r, g, b, a);
    }
BufferRenderer.drawWithGlobalProgram(buffer.end());
    RenderSystem.setShader(ShaderProgramKeys.POSITION_TEX_COLOR);
RenderSystem.setShaderTexture(0, bloom);
RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE);

BufferBuilder bulbBuffer = tessellator.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR);

 float pitch = camera.getPitch();
 float yaw = camera.getYaw();

for (int i = 0; i <= lightsCount; i++) {
float progress = (float) i / lightsCount;
float angle = (float) Math.toRadians(offset + (progress * 360f * spirals));
float currentRadius = radius * (1.0f - (progress * 0.6f));
float x = (float) Math.cos(angle) * currentRadius;
float z = (float) Math.sin(angle) * currentRadius;
 float y = progress * height;

float size = 0.15f * easeOutCubic(anim);
float twinkle = (float) Math.sin((System.currentTimeMillis() / 100.0) + i) * 0.2f + 0.8f;
 float alpha = anim * twinkle;

 int color = getFestiveColor(i);
int finalColor = ColorUtil.multAlpha(color, alpha);

        drawBillboard(bulbBuffer, ms, x, y, z, size, yaw, pitch, finalColor);
    }

BufferRenderer.drawWithGlobalProgram(bulbBuffer.end());

RenderSystem.depthMask(true);
RenderSystem.disableBlend();
RenderSystem.enableCull();
    ms.pop();
}

private void drawBillboard(BufferBuilder buffer, MatrixStack ms, float x, float y, float z, float scale, float yaw, float pitch, int color) {
    ms.push();
    ms.translate(x, y, z);
ms.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-yaw));
ms.multiply(RotationAxis.POSITIVE_X.rotationDegrees(pitch));

    Matrix4f matrix = ms.peek().getPositionMatrix();

int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = color & 0xFF;
int a = (color >> 24) & 0xFF;

buffer.vertex(matrix, -scale, -scale, 0).texture(0, 0).color(r, g, b, a);
buffer.vertex(matrix, -scale, scale, 0).texture(0, 1).color(r, g, b, a);
buffer.vertex(matrix, scale, scale, 0).texture(1, 1).color(r, g, b, a);
buffer.vertex(matrix, scale, -scale, 0).texture(1, 0).color(r, g, b, a);

    ms.pop();
}

private int getFestiveColor(int index) {
int type = index % 4;
 return switch (type) {
case 0 -> 0xFFFF0000;
case 1 -> 0xFFFFD700;
case 2 -> 0xFF00FF00;
case 3 -> 0xFF00BFFF;
default -> 0xFFFFFFFF;
    };
}
+rep это имба
 
Назад
Сверху Снизу