improve visuals
This commit is contained in:
parent
b25dd6161a
commit
e3e5fbd7fd
15 changed files with 31 additions and 64 deletions
|
@ -3874,6 +3874,8 @@ public class Renderer {
|
|||
int i = 0;
|
||||
float f = 0.0F;
|
||||
int n = 0;
|
||||
int a = 0;
|
||||
int s = 0;
|
||||
|
||||
for (int j = 0; j < 4; ++j)
|
||||
{
|
||||
|
@ -3893,14 +3895,16 @@ public class Renderer {
|
|||
|
||||
if (!material.isNonBlock()) // material != block
|
||||
{
|
||||
if (material == Blocks.air)
|
||||
if (!material.canConnectNonBlock())
|
||||
{
|
||||
++a;
|
||||
f += 4;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++s;
|
||||
f += 1.0F / 9.0f;
|
||||
i += 10;
|
||||
|
||||
|
@ -3909,6 +3913,6 @@ public class Renderer {
|
|||
}
|
||||
}
|
||||
|
||||
return n == 4 ? 1.0f : 1.0F - f / (float)i;
|
||||
return n == 4 ? 1.0f : (s + a == 4 && a > 1 ? 0.0f : 1.0F - f / (float)i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public enum Shader {
|
|||
context.integer("n_lights", 0);
|
||||
|
||||
context.color3("specular", Client.CLIENT.specularColors && !Client.CLIENT.setGamma && !Client.CLIENT.xrayActive ? 0xffffff : 0x000000);
|
||||
context.bool("shade", Client.CLIENT.flatShading);
|
||||
context.bool("shade", Client.CLIENT.flatShading || Client.CLIENT.setGamma || Client.CLIENT.xrayActive);
|
||||
|
||||
GlState.setActiveTexture(GL46.GL_TEXTURE0);
|
||||
// glBindBufferBase(GL_UNIFORM_BUFFER, 0, world->light_buf);
|
||||
|
|
|
@ -31,8 +31,6 @@ import common.util.Vec3i;
|
|||
|
||||
public class RenderItem
|
||||
{
|
||||
private static final String RES_ITEM_GLINT = "textures/glint.png";
|
||||
|
||||
private final ItemModelMesher mesher;
|
||||
private final TextureManager manager;
|
||||
private final LayerArmor armor = new LayerArmor(null, 12, 12) {
|
||||
|
@ -99,11 +97,6 @@ public class RenderItem
|
|||
{
|
||||
GL46.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
this.renderModel(model, stack);
|
||||
|
||||
if (stack.getItem().isGleaming(stack))
|
||||
{
|
||||
this.renderEffect(model);
|
||||
}
|
||||
}
|
||||
|
||||
GL46.glPopMatrix();
|
||||
|
@ -171,36 +164,6 @@ public class RenderItem
|
|||
}
|
||||
}
|
||||
|
||||
private void renderEffect(IBakedModel model)
|
||||
{
|
||||
GlState.depthMask(false);
|
||||
GlState.depthFunc(GL46.GL_EQUAL);
|
||||
GlState.disableLighting();
|
||||
GlState.blendFunc(GL46.GL_SRC_COLOR, GL46.GL_ONE);
|
||||
this.manager.bindTexture(RES_ITEM_GLINT);
|
||||
GL46.glMatrixMode(GL46.GL_TEXTURE);
|
||||
GL46.glPushMatrix();
|
||||
GL46.glScalef(8.0F, 8.0F, 8.0F);
|
||||
float f = (float)(System.currentTimeMillis() % 3000L) / 3000.0F / 8.0F;
|
||||
GL46.glTranslatef(f, 0.0F, 0.0F);
|
||||
GL46.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
|
||||
this.renderModel(model, -8372020);
|
||||
GL46.glPopMatrix();
|
||||
GL46.glPushMatrix();
|
||||
GL46.glScalef(8.0F, 8.0F, 8.0F);
|
||||
float f1 = (float)(System.currentTimeMillis() % 4873L) / 4873.0F / 8.0F;
|
||||
GL46.glTranslatef(-f1, 0.0F, 0.0F);
|
||||
GL46.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
|
||||
this.renderModel(model, -8372020);
|
||||
GL46.glPopMatrix();
|
||||
GL46.glMatrixMode(GL46.GL_MODELVIEW);
|
||||
GlState.blendFunc(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlState.enableLighting();
|
||||
GlState.depthFunc(GL46.GL_LEQUAL);
|
||||
GlState.depthMask(true);
|
||||
this.manager.bindTexture(TextureMap.BLOCKS);
|
||||
}
|
||||
|
||||
private void putQuadNormal(RenderBuffer renderer, BakedQuad quad)
|
||||
{
|
||||
Vec3i vec3i = quad.getFace().getDirectionVec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue