не знаю почемуНезнаю почему? Посмотреть вложение 282578
пиши дсКароче, не отрисовываются(
уфф броуне знаю почему Посмотреть вложение 282579
у тебя профиль скрыт кстав профиле указан
By: ctrax123, lasiiiiiggg , еще кто то
Код:@Subscribe private void onWorldEvent(WorldEvent e) { if (mode.is("Призраки")){ MatrixStack stack = new MatrixStack(); EntityRendererManager rm = mc.getRenderManager(); float c = (float) ((((System.currentTimeMillis() - startTime) / 1500F)) + (Math.sin((((System.currentTimeMillis() - startTime) / 1500F))) / 10f)); double x = target.lastTickPosX + (this.target.getPosX() - this.target.lastTickPosX) * (double) e.getPartialTicks() - rm.info.getProjectedView().getX(); double y = target.lastTickPosY + (this.target.getPosY() - this.target.lastTickPosY) * (double) e.getPartialTicks() - rm.info.getProjectedView().getY(); double z = target.lastTickPosZ + (this.target.getPosZ() - this.target.lastTickPosZ) * (double) e.getPartialTicks() - rm.info.getProjectedView().getZ(); float alpha = Shaders.shaderPackLoaded ? 1f : 0.5f; alpha *= 0.2F; float pl = 0; boolean fa = true; for (int b = 0; b < 3; b++) { for (float i = c * 360; i < c * 360 + 70; i += 2) { float cur = i; float min = c * 360; float max = c * 360 + 70; float dc = MathHelper.normalize(cur, c * 360 - 45, max); float degrees = i; int color = HUD.getColor(0); int color2 = HUD.getColor(90); float rf = 0.7f; double radians = Math.toRadians(degrees); double plY = pl + Math.sin(radians * 1.2f) * 0.1f; stack.push(); stack.translate(x, y, z); //stack.rotate(rm.info.getRotation()); //stack.rotate(mc.getRenderManager().info.getRotation()); stack.rotate(Vector3f.YP.rotationDegrees(-rm.info.getYaw())); depthMask(false); float q = (!fa ? 0.15f : 0.15f) * (Math.max(fa ? 0.15f : 0.15f, fa ? dc : (1f - -(0.4f - dc)) / 2f) + 0.45f); float w = q * (2f + ((0.5f - alpha) * 2)); //GL11.glDisable(GL11.GL_DEPTH_TEST); RenderHelper.drawImage1(stack, new ResourceLocation("hvh/images/glow.png"), Math.cos(radians) * rf - w / 2f, plY + 1 - 0.7, Math.sin(radians) * rf - w / 2f, w, w, color, color2, color2, color); GL11.glEnable(GL11.GL_DEPTH_TEST); depthMask(true); stack.pop(); } c *= -1.25f; fa = !fa; pl += 0.45f; } } }
Код:public static void drawImage1(MatrixStack stack, ResourceLocation image, double x, double y, double z, double width, double height, int color1, int color2, int color3, int color4) { Minecraft minecraft = Minecraft.getInstance(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glAlphaFunc(GL11.GL_GREATER, 0); minecraft.getTextureManager().bindTexture(image); RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); bufferBuilder.begin(GL_QUADS, DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) (y + height), (float) (z)).color((color1 >> 16) & 0xFF, (color1 >> 8) & 0xFF, color1 & 0xFF, color1 >>> 24).tex(0, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) (y + height), (float) (z)).color((color2 >> 16) & 0xFF, (color2 >> 8) & 0xFF, color2 & 0xFF, color2 >>> 24).tex(1, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) y, (float) z).color((color3 >> 16) & 0xFF, (color3 >> 8) & 0xFF, color3 & 0xFF, color3 >>> 24).tex(1, 0).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) y, (float) z).color((color4 >> 16) & 0xFF, (color4 >> 8) & 0xFF, color4 & 0xFF, color4 >>> 24).tex(0, 0).lightmap(0, 240).endVertex(); tessellator.draw(); disableBlend(); }
Код:
?
помоги мне с еспешками дс Kodi4kaMQ
Рендерится в 2д или 3д пространстве?By: ctrax123, lasiiiiiggg , еще кто то
Код:@Subscribe private void onWorldEvent(WorldEvent e) { if (mode.is("Призраки")){ MatrixStack stack = new MatrixStack(); EntityRendererManager rm = mc.getRenderManager(); float c = (float) ((((System.currentTimeMillis() - startTime) / 1500F)) + (Math.sin((((System.currentTimeMillis() - startTime) / 1500F))) / 10f)); double x = target.lastTickPosX + (this.target.getPosX() - this.target.lastTickPosX) * (double) e.getPartialTicks() - rm.info.getProjectedView().getX(); double y = target.lastTickPosY + (this.target.getPosY() - this.target.lastTickPosY) * (double) e.getPartialTicks() - rm.info.getProjectedView().getY(); double z = target.lastTickPosZ + (this.target.getPosZ() - this.target.lastTickPosZ) * (double) e.getPartialTicks() - rm.info.getProjectedView().getZ(); float alpha = Shaders.shaderPackLoaded ? 1f : 0.5f; alpha *= 0.2F; float pl = 0; boolean fa = true; for (int b = 0; b < 3; b++) { for (float i = c * 360; i < c * 360 + 70; i += 2) { float cur = i; float min = c * 360; float max = c * 360 + 70; float dc = MathHelper.normalize(cur, c * 360 - 45, max); float degrees = i; int color = HUD.getColor(0); int color2 = HUD.getColor(90); float rf = 0.7f; double radians = Math.toRadians(degrees); double plY = pl + Math.sin(radians * 1.2f) * 0.1f; stack.push(); stack.translate(x, y, z); //stack.rotate(rm.info.getRotation()); //stack.rotate(mc.getRenderManager().info.getRotation()); stack.rotate(Vector3f.YP.rotationDegrees(-rm.info.getYaw())); depthMask(false); float q = (!fa ? 0.15f : 0.15f) * (Math.max(fa ? 0.15f : 0.15f, fa ? dc : (1f - -(0.4f - dc)) / 2f) + 0.45f); float w = q * (2f + ((0.5f - alpha) * 2)); //GL11.glDisable(GL11.GL_DEPTH_TEST); RenderHelper.drawImage1(stack, new ResourceLocation("hvh/images/glow.png"), Math.cos(radians) * rf - w / 2f, plY + 1 - 0.7, Math.sin(radians) * rf - w / 2f, w, w, color, color2, color2, color); GL11.glEnable(GL11.GL_DEPTH_TEST); depthMask(true); stack.pop(); } c *= -1.25f; fa = !fa; pl += 0.45f; } } }
Код:public static void drawImage1(MatrixStack stack, ResourceLocation image, double x, double y, double z, double width, double height, int color1, int color2, int color3, int color4) { Minecraft minecraft = Minecraft.getInstance(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glAlphaFunc(GL11.GL_GREATER, 0); minecraft.getTextureManager().bindTexture(image); RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); bufferBuilder.begin(GL_QUADS, DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) (y + height), (float) (z)).color((color1 >> 16) & 0xFF, (color1 >> 8) & 0xFF, color1 & 0xFF, color1 >>> 24).tex(0, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) (y + height), (float) (z)).color((color2 >> 16) & 0xFF, (color2 >> 8) & 0xFF, color2 & 0xFF, color2 >>> 24).tex(1, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) y, (float) z).color((color3 >> 16) & 0xFF, (color3 >> 8) & 0xFF, color3 & 0xFF, color3 >>> 24).tex(1, 0).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) y, (float) z).color((color4 >> 16) & 0xFF, (color4 >> 8) & 0xFF, color4 & 0xFF, color4 >>> 24).tex(0, 0).lightmap(0, 240).endVertex(); tessellator.draw(); disableBlend(); }
ss: Посмотреть вложение 281506Код:public static float normalize(float value, float min, float max) { return (value - min) / (max - min); }
эмBy: ctrax123, lasiiiiiggg , еще кто то
Код:@Subscribe private void onWorldEvent(WorldEvent e) { if (mode.is("Призраки")){ MatrixStack stack = new MatrixStack(); EntityRendererManager rm = mc.getRenderManager(); float c = (float) ((((System.currentTimeMillis() - startTime) / 1500F)) + (Math.sin((((System.currentTimeMillis() - startTime) / 1500F))) / 10f)); double x = target.lastTickPosX + (this.target.getPosX() - this.target.lastTickPosX) * (double) e.getPartialTicks() - rm.info.getProjectedView().getX(); double y = target.lastTickPosY + (this.target.getPosY() - this.target.lastTickPosY) * (double) e.getPartialTicks() - rm.info.getProjectedView().getY(); double z = target.lastTickPosZ + (this.target.getPosZ() - this.target.lastTickPosZ) * (double) e.getPartialTicks() - rm.info.getProjectedView().getZ(); float alpha = Shaders.shaderPackLoaded ? 1f : 0.5f; alpha *= 0.2F; float pl = 0; boolean fa = true; for (int b = 0; b < 3; b++) { for (float i = c * 360; i < c * 360 + 70; i += 2) { float cur = i; float min = c * 360; float max = c * 360 + 70; float dc = MathHelper.normalize(cur, c * 360 - 45, max); float degrees = i; int color = HUD.getColor(0); int color2 = HUD.getColor(90); float rf = 0.7f; double radians = Math.toRadians(degrees); double plY = pl + Math.sin(radians * 1.2f) * 0.1f; stack.push(); stack.translate(x, y, z); //stack.rotate(rm.info.getRotation()); //stack.rotate(mc.getRenderManager().info.getRotation()); stack.rotate(Vector3f.YP.rotationDegrees(-rm.info.getYaw())); depthMask(false); float q = (!fa ? 0.15f : 0.15f) * (Math.max(fa ? 0.15f : 0.15f, fa ? dc : (1f - -(0.4f - dc)) / 2f) + 0.45f); float w = q * (2f + ((0.5f - alpha) * 2)); //GL11.glDisable(GL11.GL_DEPTH_TEST); RenderHelper.drawImage1(stack, new ResourceLocation("hvh/images/glow.png"), Math.cos(radians) * rf - w / 2f, plY + 1 - 0.7, Math.sin(radians) * rf - w / 2f, w, w, color, color2, color2, color); GL11.glEnable(GL11.GL_DEPTH_TEST); depthMask(true); stack.pop(); } c *= -1.25f; fa = !fa; pl += 0.45f; } } }
Код:public static void drawImage1(MatrixStack stack, ResourceLocation image, double x, double y, double z, double width, double height, int color1, int color2, int color3, int color4) { Minecraft minecraft = Minecraft.getInstance(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glAlphaFunc(GL11.GL_GREATER, 0); minecraft.getTextureManager().bindTexture(image); RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); bufferBuilder.begin(GL_QUADS, DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) (y + height), (float) (z)).color((color1 >> 16) & 0xFF, (color1 >> 8) & 0xFF, color1 & 0xFF, color1 >>> 24).tex(0, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) (y + height), (float) (z)).color((color2 >> 16) & 0xFF, (color2 >> 8) & 0xFF, color2 & 0xFF, color2 >>> 24).tex(1, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) y, (float) z).color((color3 >> 16) & 0xFF, (color3 >> 8) & 0xFF, color3 & 0xFF, color3 >>> 24).tex(1, 0).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) y, (float) z).color((color4 >> 16) & 0xFF, (color4 >> 8) & 0xFF, color4 & 0xFF, color4 >>> 24).tex(0, 0).lightmap(0, 240).endVertex(); tessellator.draw(); disableBlend(); }
ss: Посмотреть вложение 281506Код:public static float normalize(float value, float min, float max) { return (value - min) / (max - min); }
если у тебя щейдером будет реальным то -100 фпсМб мне фулл туториал слить на норм таргет еспешки с шейдером и где их не видно за типом?
та не, не жрет нихуяесли у тебя щейдером будет реальным то -100 фпс
а можно их как-то зафксить чтоб когды ты на них смотриш сверху они кривыми становяцаBy: ctrax123, lasiiiiiggg , еще кто то
Код:@Subscribe private void onWorldEvent(WorldEvent e) { if (mode.is("Призраки")){ MatrixStack stack = new MatrixStack(); EntityRendererManager rm = mc.getRenderManager(); float c = (float) ((((System.currentTimeMillis() - startTime) / 1500F)) + (Math.sin((((System.currentTimeMillis() - startTime) / 1500F))) / 10f)); double x = target.lastTickPosX + (this.target.getPosX() - this.target.lastTickPosX) * (double) e.getPartialTicks() - rm.info.getProjectedView().getX(); double y = target.lastTickPosY + (this.target.getPosY() - this.target.lastTickPosY) * (double) e.getPartialTicks() - rm.info.getProjectedView().getY(); double z = target.lastTickPosZ + (this.target.getPosZ() - this.target.lastTickPosZ) * (double) e.getPartialTicks() - rm.info.getProjectedView().getZ(); float alpha = Shaders.shaderPackLoaded ? 1f : 0.5f; alpha *= 0.2F; float pl = 0; boolean fa = true; for (int b = 0; b < 3; b++) { for (float i = c * 360; i < c * 360 + 70; i += 2) { float cur = i; float min = c * 360; float max = c * 360 + 70; float dc = MathHelper.normalize(cur, c * 360 - 45, max); float degrees = i; int color = HUD.getColor(0); int color2 = HUD.getColor(90); float rf = 0.7f; double radians = Math.toRadians(degrees); double plY = pl + Math.sin(radians * 1.2f) * 0.1f; stack.push(); stack.translate(x, y, z); //stack.rotate(rm.info.getRotation()); //stack.rotate(mc.getRenderManager().info.getRotation()); stack.rotate(Vector3f.YP.rotationDegrees(-rm.info.getYaw())); depthMask(false); float q = (!fa ? 0.15f : 0.15f) * (Math.max(fa ? 0.15f : 0.15f, fa ? dc : (1f - -(0.4f - dc)) / 2f) + 0.45f); float w = q * (2f + ((0.5f - alpha) * 2)); //GL11.glDisable(GL11.GL_DEPTH_TEST); RenderHelper.drawImage1(stack, new ResourceLocation("hvh/images/glow.png"), Math.cos(radians) * rf - w / 2f, plY + 1 - 0.7, Math.sin(radians) * rf - w / 2f, w, w, color, color2, color2, color); GL11.glEnable(GL11.GL_DEPTH_TEST); depthMask(true); stack.pop(); } c *= -1.25f; fa = !fa; pl += 0.45f; } } }
Код:public static void drawImage1(MatrixStack stack, ResourceLocation image, double x, double y, double z, double width, double height, int color1, int color2, int color3, int color4) { Minecraft minecraft = Minecraft.getInstance(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glAlphaFunc(GL11.GL_GREATER, 0); minecraft.getTextureManager().bindTexture(image); RenderSystem.color4f(1.0f, 1.0f, 1.0f, 1.0f); Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferBuilder = tessellator.getBuffer(); bufferBuilder.begin(GL_QUADS, DefaultVertexFormats.POSITION_COLOR_TEX_LIGHTMAP); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) (y + height), (float) (z)).color((color1 >> 16) & 0xFF, (color1 >> 8) & 0xFF, color1 & 0xFF, color1 >>> 24).tex(0, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) (y + height), (float) (z)).color((color2 >> 16) & 0xFF, (color2 >> 8) & 0xFF, color2 & 0xFF, color2 >>> 24).tex(1, 1 - 0.01f).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) (x + width), (float) y, (float) z).color((color3 >> 16) & 0xFF, (color3 >> 8) & 0xFF, color3 & 0xFF, color3 >>> 24).tex(1, 0).lightmap(0, 240).endVertex(); bufferBuilder.pos(stack.getLast().getMatrix(), (float) x, (float) y, (float) z).color((color4 >> 16) & 0xFF, (color4 >> 8) & 0xFF, color4 & 0xFF, color4 >>> 24).tex(0, 0).lightmap(0, 240).endVertex(); tessellator.draw(); disableBlend(); }
ss: Посмотреть вложение 281506Код:public static float normalize(float value, float min, float max) { return (value - min) / (max - min); }
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz