improve visuals
This commit is contained in:
parent
31bdece813
commit
c6217bf106
36 changed files with 23 additions and 119 deletions
|
@ -722,6 +722,8 @@ public class Client implements IThreadListener {
|
|||
private MipmapType mipmapType = MipmapType.LINEAR;
|
||||
@Variable(name = "gl_tex_filter", category = CVarCategory.RENDER, display = "Texturfilterung", callback = TextureBoolFunction.class)
|
||||
private boolean textureFiltering = true;
|
||||
@Variable(name = "gl_specular", category = CVarCategory.RENDER, display = "Beleuchtungseffekte")
|
||||
public boolean specularColors = true;
|
||||
|
||||
public static final Client CLIENT = new Client();
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ public class GuiGraphics extends GuiOptions {
|
|||
this.addSelector("gl_dynlight_maxdist", 242, 200, 240, 0);
|
||||
|
||||
this.addSelector("gl_light_blend", 0, 220, 240, 0);
|
||||
this.addSelector("gl_specular", 242, 220, 240, 0);
|
||||
|
||||
this.addSelector("gl_tex_filter", 0, 240, 240, 0);
|
||||
this.addSelector("gl_tex_mipmaps", 242, 240, 240, 0);
|
||||
|
|
|
@ -1179,7 +1179,6 @@ public class Renderer {
|
|||
GlState.enableAlpha();
|
||||
GlState.alphaFunc(GL46.GL_GREATER, 0.5F);
|
||||
|
||||
boolean flag = this.gm.getRenderViewEntity() != null && this.gm.getRenderViewEntity().isPlayer();
|
||||
GlState.enableCull();
|
||||
this.updateFogColor(partialTicks);
|
||||
GL46.glClear(16640);
|
||||
|
@ -1235,26 +1234,9 @@ public class Renderer {
|
|||
GL46.glPopMatrix();
|
||||
GL46.glPushMatrix();
|
||||
|
||||
if (this.gm.pointed != null && entity.isInsideOfLiquid() && flag)
|
||||
{
|
||||
EntityNPC entityplayer = (EntityNPC)entity;
|
||||
GlState.disableAlpha();
|
||||
this.drawSelectionBox(entityplayer, this.gm.pointed, partialTicks);
|
||||
GlState.enableAlpha();
|
||||
}
|
||||
// }
|
||||
|
||||
GL46.glMatrixMode(GL46.GL_MODELVIEW);
|
||||
GL46.glPopMatrix();
|
||||
|
||||
if (flag && this.gm.pointed != null && !entity.isInsideOfLiquid())
|
||||
{
|
||||
EntityNPC entityplayer1 = (EntityNPC)entity;
|
||||
GlState.disableAlpha();
|
||||
this.drawSelectionBox(entityplayer1, this.gm.pointed, partialTicks);
|
||||
GlState.enableAlpha();
|
||||
}
|
||||
// GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ONE, GL46.GL_ZERO);
|
||||
GlState.disableBlend();
|
||||
|
||||
|
@ -2599,7 +2581,7 @@ public class Renderer {
|
|||
break;
|
||||
}
|
||||
}
|
||||
context.bool("sky_light", this.theWorld.dimension.hasSkyLight() && !this.gm.setGamma);
|
||||
context.bool("sky_light", this.theWorld.dimension.hasSkyLight() && !this.gm.setGamma && !this.gm.xrayActive);
|
||||
context.bool("moon_light", moon);
|
||||
for (RenderChunk renderchunk : this.renderChunks)
|
||||
{
|
||||
|
@ -3091,40 +3073,6 @@ public class Renderer {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws the selection box for the player. Args: entityPlayer, rayTraceHit, i, itemStack, partialTickTime
|
||||
*
|
||||
* @param execute If equals to 0 the method is executed
|
||||
*/
|
||||
private void drawSelectionBox(EntityNPC player, HitPosition movingObjectPositionIn, float partialTicks)
|
||||
{
|
||||
if (movingObjectPositionIn.type == HitPosition.ObjectType.BLOCK)
|
||||
{
|
||||
GlState.enableBlend();
|
||||
GlState.tryBlendFuncSeparate(GL46.GL_SRC_ALPHA, GL46.GL_ONE_MINUS_SRC_ALPHA, GL46.GL_ONE, GL46.GL_ZERO);
|
||||
GlState.color(0.0F, 0.0F, 0.0F, 0.4F);
|
||||
GL46.glLineWidth(2.0F);
|
||||
GlState.disableTexture2D();
|
||||
GlState.depthMask(false);
|
||||
float f = 0.002F;
|
||||
BlockPos blockpos = movingObjectPositionIn.block;
|
||||
Block block = this.theWorld.getState(blockpos).getBlock();
|
||||
|
||||
if (block != Blocks.air) // && this.theWorld.getWorldBorder().contains(blockpos))
|
||||
{
|
||||
block.setBlockBounds(this.theWorld, blockpos);
|
||||
double d0 = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double)partialTicks;
|
||||
double d1 = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double)partialTicks;
|
||||
double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double)partialTicks;
|
||||
drawSelectionBoundingBox(block.getSelectionBox(this.theWorld, blockpos).expand(0.0020000000949949026D, 0.0020000000949949026D, 0.0020000000949949026D).offset(-d0, -d1, -d2));
|
||||
}
|
||||
|
||||
GlState.depthMask(true);
|
||||
GlState.enableTexture2D();
|
||||
GlState.disableBlend();
|
||||
}
|
||||
}
|
||||
|
||||
public static void drawSelectionBoundingBox(BoundingBox boundingBox)
|
||||
{
|
||||
// Tessellator tessellator = Tessellator.getInstance();
|
||||
|
@ -3333,8 +3281,8 @@ public class Renderer {
|
|||
if(block == Blocks.air)
|
||||
return false;
|
||||
else if(block.getMaterial().isLiquid())
|
||||
return this.renderFluid(world, state, pos, rb);
|
||||
else if(block.isNonBlock())
|
||||
return !this.gm.xrayActive && this.renderFluid(world, state, pos, rb);
|
||||
else if(block.isNonBlock() && !this.gm.xrayActive)
|
||||
return this.renderDynamic(world, state, pos, rb);
|
||||
State mstate = state;
|
||||
if(!this.gm.debugWorld) {
|
||||
|
|
|
@ -56,7 +56,7 @@ public enum Shader {
|
|||
context.vec("max_cam_dist", Client.CLIENT.lightDistCam);
|
||||
context.integer("n_lights", 0);
|
||||
|
||||
context.color3("specular", 0xffffff);
|
||||
context.color3("specular", Client.CLIENT.specularColors && !Client.CLIENT.setGamma && !Client.CLIENT.xrayActive ? 0xffffff : 0x000000);
|
||||
|
||||
GlState.setActiveTexture(GL46.GL_TEXTURE0);
|
||||
// glBindBufferBase(GL_UNIFORM_BUFFER, 0, world->light_buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue