из белого в черный

Версия Minecraft
1.5.2

jopi

Попрошайка
1,421
30
260
Почему GL11 такой кусок куска что не может сделать из белой картинки черную, а если выкрутить glColor4f в нули(альфа всеравно 1.0) то текстура ваще прозрачной становится?
Как отрендерить черную текстуру из белой
 

jopi

Попрошайка
1,421
30
260
@tox1cozZ

Java:
    public void renderParticle(Tessellator par1Tessellator, float f, float f1, float f2, float f3, float f4, float f5) {
        float agescale = 0.05F;
        if (super.particleMaxAge > 0) {
            par1Tessellator.draw();
            GL11.glPushMatrix();
            GL11.glDepthMask(false);
            GL11.glEnable(3042);
            GL11.glBlendFunc(770, 1);
            float f9 = (float) (f2 * this.scale);
            float f10 = 0.5F * super.particleScale;
            float f11 = (float) (super.prevPosX + (super.posX - super.prevPosX) * (double) f - EntityFX.interpPosX);
            float f12 = (float) (super.prevPosY + (super.posY - super.prevPosY) * (double) f - EntityFX.interpPosY);
            float f13 = (float) (super.prevPosZ + (super.posZ - super.prevPosZ) * (double) f - EntityFX.interpPosZ);
            Minecraft.getMinecraft().renderEngine.bindTexture("/mods/lavacraft/textures/fx/firetest.png");
            float fade = 0.0F;
            if (this.particleAge >= this.fadeAge) {
                int age = this.particleAge - this.fadeAge;
                float mult = this.color[3] / (float)(this.particleMaxAge - this.fadeAge);
                fade = age * mult;
            }
            GL11.glColor4f(this.color[0] - (fade * 1.5F), this.color[1] - (fade * 1.5F), this.color[2] - (fade * 1.5F), this.color[3] - (fade * 1.5F));
            //this.drawpart(par1Tessellator, f11, f1, f10, f4, f12, f2, f3, f13, f5);
            //> тут должна быть белая картинка полностью отрендерена как черная но она наоборот становится невидимой
            Minecraft.getMinecraft().renderEngine.bindTexture("/mods/artho/textures/fx/portalblack.png");
            GL11.glColor4f(0.0F, 0.0F, 0.0F, 1.0F);
            this.drawpart(par1Tessellator, f11, f1, f10, f4, f12, f2, f3, f13, f5);
            //<
            GL11.glDisable(3042);
            GL11.glDepthMask(true);
            GL11.glPopMatrix();
            Minecraft.getMinecraft().renderEngine.bindTexture("/particles.png");
            par1Tessellator.startDrawingQuads();
        }
    }

    public void drawpart(Tessellator par1Tessellator, float f11, float f1, float f10, float f4, float f12, float f2, float f3, float f13, float f5) {
        par1Tessellator.startDrawingQuads();
        par1Tessellator.setBrightness(240);
        par1Tessellator.addVertexWithUV((double) (f11 - (f1 * this.scale) * f10 - (f4 * this.scale) * f10), (double) (f12 - (f2 * 2 * this.scale) * f10), (double) (f13 - (f3 * this.scale) * f10 - (f5 * this.scale) * f10), 1.0D, 1.0D);
        par1Tessellator.addVertexWithUV((double) (f11 - (f1 * this.scale) * f10 + (f4 * this.scale) * f10), (double) (f12 + (f2 * 2 * this.scale) * f10), (double) (f13 - (f3 * this.scale) * f10 + (f5 * this.scale) * f10), 1.0D, 0.0D);
        par1Tessellator.addVertexWithUV((double) (f11 + (f1 * this.scale) * f10 + (f4 * this.scale) * f10), (double) (f12 + (f2 * 2 * this.scale) * f10), (double) (f13 + (f3 * this.scale) * f10 + (f5 * this.scale) * f10), 0.0D, 0.0D);
        par1Tessellator.addVertexWithUV((double) (f11 + (f1 * this.scale) * f10 - (f4 * this.scale) * f10), (double) (f12 - (f2 * 2 * this.scale) * f10), (double) (f13 + (f3 * this.scale) * f10 - (f5 * this.scale) * f10), 0.0D, 1.0D);
        par1Tessellator.draw();
    }
 
7,099
324
1,510
Сверху