Turned down the blood abit
This commit is contained in:
parent
3cf6f0cc1e
commit
c4250dcfff
|
|
@ -24,7 +24,7 @@ public class DisplayRender
|
||||||
{
|
{
|
||||||
public static int shadow_fbo;
|
public static int shadow_fbo;
|
||||||
public static int shadow_depth;
|
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)
|
private static int generateDepthTexture(int width, int height)
|
||||||
{
|
{
|
||||||
|
|
@ -108,26 +108,34 @@ public class DisplayRender
|
||||||
|
|
||||||
Main.world.markPoolDirty();
|
Main.world.markPoolDirty();
|
||||||
|
|
||||||
// Render from the sun/moons perspective
|
LayerGen layergen = Main.world.getLayer().layergen;
|
||||||
|
//double sunPosition = MathHelpers.mod(layergen.getSunPosition(), 360);
|
||||||
|
|
||||||
|
if(layergen.hasSun() /*&& sunPosition > 0 && sunPosition < 180*/ && shadow_size != 1)
|
||||||
|
{
|
||||||
|
// Set up the suns frame buffer
|
||||||
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, shadow_fbo);
|
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, shadow_fbo);
|
||||||
glClear(GL_DEPTH_BUFFER_BIT);
|
glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
glViewport(0, 0, shadow_size, shadow_size);
|
|
||||||
|
|
||||||
GL33.glUniformMatrix4fv(Main.window.glsl_projection, true, Camera.camera.projection_sun.getArray());
|
// Set up the suns perspective
|
||||||
|
GL33.glUniformMatrix4fv(Main.window.glsl_projection, true,
|
||||||
|
Camera.camera.projection_sun.getArray());
|
||||||
GL33.glUniform1i(Main.window.glsl_mode, 1);
|
GL33.glUniform1i(Main.window.glsl_mode, 1);
|
||||||
LayerGen layergen = Main.world.getLayer().layergen;
|
|
||||||
double sunPosition = MathHelpers.mod(layergen.getSunPosition(), 360);
|
|
||||||
|
|
||||||
if(layergen.hasSun() && sunPosition > 0 && sunPosition < 180 && shadow_size != 1) {
|
// Render from the suns perspective
|
||||||
|
glViewport(0, 0, shadow_size, shadow_size);
|
||||||
Main.world.render(camera);
|
Main.world.render(camera);
|
||||||
}
|
|
||||||
|
|
||||||
// Render from the player perspective
|
// Set back to the players frame buffer
|
||||||
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, 0);
|
GL33.glBindFramebuffer(GL33.GL_FRAMEBUFFER, 0);
|
||||||
glViewport(0, 0, w, h);
|
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);
|
GL33.glUniform1i(Main.window.glsl_mode, 0);
|
||||||
|
|
||||||
Main.world.render(camera);
|
Main.world.render(camera);
|
||||||
|
|
||||||
player.chunk = Main.world.getLayer().getChunk(player.getPos().xz());
|
player.chunk = Main.world.getLayer().getChunk(player.getPos().xz());
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@ import projectzombie.init.Models;
|
||||||
public class ParticleBlood extends ParticleBreak
|
public class ParticleBlood extends ParticleBreak
|
||||||
{
|
{
|
||||||
public ParticleBlood(Vec3d pos, Vec3d velocity, int size) {
|
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) {
|
public ParticleBlood(Vec3d pos, Vec3d velocity) {
|
||||||
this(pos, velocity, 100);
|
this(pos, velocity, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public class ParticleBreak extends EntityParticle
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParticleBreak(Vec3d pos, Vec3d velocity, IModel model) {
|
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) {
|
public ParticleBreak(Vec3d pos, Vec3d velocity, IModel model, int count) {
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,8 @@ public class EntityPlayer extends Entity implements
|
||||||
inventory = new Inventory(42);
|
inventory = new Inventory(42);
|
||||||
armor = new InventoryArmor();
|
armor = new InventoryArmor();
|
||||||
clothing = new InventoryClothing();
|
clothing = new InventoryClothing();
|
||||||
|
|
||||||
|
clothing.setShirt(new ItemStack(Items.SPAWN_ZOMBIE, 99, (short)0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ public class LayerGenEarth extends LayerGen
|
||||||
new Vec3d(-255/255.0, -244/255.0, -208/255.0),
|
new Vec3d(-255/255.0, -244/255.0, -208/255.0),
|
||||||
new Vec3d(205/255.0, 191/255.0, 162/255.0));
|
new Vec3d(205/255.0, 191/255.0, 162/255.0));
|
||||||
|
|
||||||
Vec3d daylight = daylightRange.getColor(MathHelpers.sin(light) * 0.5 + 0.5);
|
Vec3d daylight = daylightRange.getColor(MathHelpers.sin(light * MathHelpers.HALF_PI) * 0.5 + 0.5);
|
||||||
return new ColorRange(daylight.multiply(7/8.0), daylight);
|
return new ColorRange(daylight.multiply(5/6.0), daylight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue