improve visuals
This commit is contained in:
parent
c617be685b
commit
31bdece813
42 changed files with 190 additions and 281 deletions
|
@ -3925,6 +3925,7 @@ public class Renderer {
|
|||
{
|
||||
int i = 0;
|
||||
float f = 0.0F;
|
||||
int n = 0;
|
||||
|
||||
for (int j = 0; j < 4; ++j)
|
||||
{
|
||||
|
@ -3934,11 +3935,15 @@ public class Renderer {
|
|||
{
|
||||
return 1.0F;
|
||||
}
|
||||
if (blockAccess.getState(blockpos.down()).getBlock() == Blocks.air)
|
||||
{
|
||||
n++;
|
||||
}
|
||||
|
||||
State iblockstate = blockAccess.getState(blockpos);
|
||||
Block material = iblockstate.getBlock();
|
||||
|
||||
if (material != block)
|
||||
if (!material.isNonBlock()) // material != block
|
||||
{
|
||||
if (material == Blocks.air)
|
||||
{
|
||||
|
@ -3956,6 +3961,6 @@ public class Renderer {
|
|||
}
|
||||
}
|
||||
|
||||
return 1.0F - f / (float)i;
|
||||
return n == 4 ? 1.0f : 1.0F - f / (float)i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ vec3 calc_point_light(light_t light, vec3 norm, vec3 dir, vec3 rgb) {
|
|||
|
||||
void main() {
|
||||
if(shine <= 0.0) {
|
||||
vec2 coord = fract(tex_coord * textureSize(tex, 0) / 512.0) * vis_div; // vertex.xz + vec2(0.25, 0.5)) * 24.0 / 2.0;
|
||||
vec2 coord = fract(tex_coord * textureSize(tex, 0) / 256.0) * vis_div; // vertex.xz + vec2(0.25, 0.5)) * 24.0 / 2.0;
|
||||
vec2 shift = vec2(v2rand(coord + fract(time)) * 2.0 - 1.0, v2rand(coord + 0.5 + fract(time)) * 2.0 - 1.0);
|
||||
shift = vec2(dgauss(shift.x, 0.0, 1.0), dgauss(shift.y, 0.0, 1.0)) * 0.015;
|
||||
vec3 cl = vec3(inside(coord / vis_div, shift, 0.0, 1.0, 64.0, 1.0, 3.0, 1.0, 3.0), inside(coord / vis_div, shift, 0.0, 1.0, 64.0, 63.0, 1.0, 63.0, 1.0), inside(coord / vis_div, shift, 0.0, 1.0, 64.0, 61.0, 63.0, 61.0, 63.0));
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 330 KiB After Width: | Height: | Size: 83 KiB |
Binary file not shown.
Before Width: | Height: | Size: 729 KiB After Width: | Height: | Size: 173 KiB |
Binary file not shown.
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 314 B |
Loading…
Add table
Add a link
Reference in a new issue