Turned down the blood abit

This commit is contained in:
jsrobson10 2020-07-21 14:25:22 +10:00
parent 3cf6f0cc1e
commit c4250dcfff
5 changed files with 30 additions and 20 deletions

View File

@ -24,7 +24,7 @@ public class DisplayRender
{
public static int shadow_fbo;
public static int shadow_depth;
public static int shadow_size = 8192;
public static int shadow_size = 2048;
private static int generateDepthTexture(int width, int height)
{
@ -108,26 +108,34 @@ public class DisplayRender
Main.world.markPoolDirty();
// Render from the sun/moons perspective
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, shadow_fbo);
glClear(GL_DEPTH_BUFFER_BIT);
glViewport(0, 0, shadow_size, shadow_size);
GL33.glUniformMatrix4fv(Main.window.glsl_projection, true, Camera.camera.projection_sun.getArray());
GL33.glUniform1i(Main.window.glsl_mode, 1);
LayerGen layergen = Main.world.getLayer().layergen;
double sunPosition = MathHelpers.mod(layergen.getSunPosition(), 360);
//double sunPosition = MathHelpers.mod(layergen.getSunPosition(), 360);
if(layergen.hasSun() && sunPosition > 0 && sunPosition < 180 && shadow_size != 1) {
if(layergen.hasSun() /*&& sunPosition > 0 && sunPosition < 180*/ && shadow_size != 1)
{
// Set up the suns frame buffer
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, shadow_fbo);
glClear(GL_DEPTH_BUFFER_BIT);
// Set up the suns perspective
GL33.glUniformMatrix4fv(Main.window.glsl_projection, true,
Camera.camera.projection_sun.getArray());
GL33.glUniform1i(Main.window.glsl_mode, 1);
// Render from the suns perspective
glViewport(0, 0, shadow_size, shadow_size);
Main.world.render(camera);
// Set back to the players frame buffer
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, 0);
glViewport(0, 0, w, h);
}
// Render from the player perspective
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, 0);
glViewport(0, 0, w, h);
GL33.glUniformMatrix4fv(Main.window.glsl_projection, true, Camera.camera.projection.getArray());
// Set to the players perspective and render
GL33.glUniformMatrix4fv(Main.window.glsl_projection, true,
Camera.camera.projection.getArray());
GL33.glUniform1i(Main.window.glsl_mode, 0);
Main.world.render(camera);
player.chunk = Main.world.getLayer().getChunk(player.getPos().xz());

View File

@ -6,11 +6,11 @@ import projectzombie.init.Models;
public class ParticleBlood extends ParticleBreak
{
public ParticleBlood(Vec3d pos, Vec3d velocity, int size) {
super(pos, velocity, Models.PARTICLE_BLOOD, size, 0.1);
super(pos, velocity, Models.PARTICLE_BLOOD, size, 0.25);
}
public ParticleBlood(Vec3d pos, Vec3d velocity) {
this(pos, velocity, 100);
this(pos, velocity, 20);
}
@Override

View File

@ -57,7 +57,7 @@ public class ParticleBreak extends EntityParticle
}
public ParticleBreak(Vec3d pos, Vec3d velocity, IModel model) {
this(pos, velocity, model, 200, 0.05);
this(pos, velocity, model, 100, 0.05);
}
public ParticleBreak(Vec3d pos, Vec3d velocity, IModel model, int count) {

View File

@ -133,6 +133,8 @@ public class EntityPlayer extends Entity implements
inventory = new Inventory(42);
armor = new InventoryArmor();
clothing = new InventoryClothing();
clothing.setShirt(new ItemStack(Items.SPAWN_ZOMBIE, 99, (short)0));
}
@Override

View File

@ -224,7 +224,7 @@ public class LayerGenEarth extends LayerGen
new Vec3d(-255/255.0, -244/255.0, -208/255.0),
new Vec3d(205/255.0, 191/255.0, 162/255.0));
Vec3d daylight = daylightRange.getColor(MathHelpers.sin(light) * 0.5 + 0.5);
return new ColorRange(daylight.multiply(7/8.0), daylight);
Vec3d daylight = daylightRange.getColor(MathHelpers.sin(light * MathHelpers.HALF_PI) * 0.5 + 0.5);
return new ColorRange(daylight.multiply(5/6.0), daylight);
}
}