tree impl test; falling blocks won't destroy transparent blocks

This commit is contained in:
minjaesong
2019-07-31 01:38:27 +09:00
parent d37f431144
commit d767dc1dbf
12 changed files with 32 additions and 16 deletions

Binary file not shown.

View File

@@ -10,9 +10,9 @@ uniform sampler2D u_texture;
// "steps" of R, G and B. Must be integer && equal or greater than 2
uniform float rcount = 64.0;
uniform float rcount = 32.0;
uniform float gcount = 64.0;
uniform float bcount = 64.0;
uniform float bcount = 32.0;
uniform float acount = 1.0;
int bayer[14 * 14] = int[](131,187,8,78,50,18,134,89,155,102,29,95,184,73,22,86,113,171,142,105,34,166,9,60,151,128,40,110,168,137,45,28,64,188,82,54,124,189,80,13,156,56,7,61,186,121,154,6,108,177,24,100,38,176,93,123,83,148,96,17,88,133,44,145,69,161,139,72,30,181,115,27,163,47,178,65,164,14,120,48,5,127,153,52,190,58,126,81,116,21,106,77,173,92,191,63,99,12,76,144,4,185,37,149,192,39,135,23,117,31,170,132,35,172,103,66,129,79,3,97,57,159,70,141,53,94,114,20,49,158,19,146,169,122,183,11,104,180,2,165,152,87,182,118,91,42,67,25,84,147,43,85,125,68,16,136,71,10,193,112,160,138,51,111,162,26,194,46,174,107,41,143,33,74,1,101,195,15,75,140,109,90,32,62,157,98,167,119,179,59,36,130,175,55,0,150);
@@ -53,6 +53,7 @@ void main(void) {
vec2 entry = mod(gl_FragCoord.xy, vec2(bayerSize, bayerSize));
gl_FragColor = nearestColour(inColor + spread * (bayer[int(entry.y) * int(bayerSize) + int(entry.x)] / bayerDivider - 0.5));
vec4 outColor = nearestColour(inColor + spread * (bayer[int(entry.y) * int(bayerSize) + int(entry.x)] / bayerDivider - 0.5));
gl_FragColor = outColor;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -18,10 +18,10 @@
"49";"49";"BLOCK_PLANK_EBONY";"0.1252";"0.1252";"0.1252";"0.1252";"19";"1200";"WOOD";"1";"0";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"50";"50";"BLOCK_PLANK_BIRCH";"0.1252";"0.1252";"0.1252";"0.1252";"15";"670";"WOOD";"1";"0";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"51";"51";"BLOCK_PLANK_BLOODROSE";"0.1252";"0.1252";"0.1252";"0.1252";"17";"900";"WOOD";"1";"0";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"64";"64";"BLOCK_TRUNK_NORMAL";"0.1252";"0.1252";"0.1252";"0.1252";"16";"740";"WOOD";"1";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"65";"65";"BLOCK_TRUNK_EBONY";"0.1252";"0.1252";"0.1252";"0.1252";"19";"1200";"WOOD";"1";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"66";"66";"BLOCK_TRUNK_BIRCH";"0.1252";"0.1252";"0.1252";"0.1252";"15";"670";"WOOD";"1";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"67";"67";"BLOCK_TRUNK_BLOODROSE";"0.1252";"0.1252";"0.1252";"0.1252";"17";"900";"WOOD";"1";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"64";"64";"BLOCK_TRUNK_NORMAL";"0.1252";"0.1252";"0.1252";"0.1252";"16";"740";"WOOD";"0";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"65";"65";"BLOCK_TRUNK_EBONY";"0.1252";"0.1252";"0.1252";"0.1252";"19";"1200";"WOOD";"0";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"66";"66";"BLOCK_TRUNK_BIRCH";"0.1252";"0.1252";"0.1252";"0.1252";"15";"670";"WOOD";"0";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"67";"67";"BLOCK_TRUNK_BLOODROSE";"0.1252";"0.1252";"0.1252";"0.1252";"17";"900";"WOOD";"0";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"80";"80";"BLOCK_SAND";"0.1252";"0.1252";"0.1252";"0.1252";"24";"2400";"SAND";"1";"0";"0";"0";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"81";"81";"BLOCK_SAND_WHITE";"0.1252";"0.1252";"0.1252";"0.1252";"24";"2400";"SAND";"1";"0";"0";"0";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"82";"82";"BLOCK_SAND_RED";"0.1252";"0.1252";"0.1252";"0.1252";"24";"2400";"SAND";"1";"0";"0";"0";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
1 id drop name shdr shdg shdb shduv str dsty mate solid plat wall grav dlfn fv fr lumr lumg lumb lumuv colour vscs
18 49 49 BLOCK_PLANK_EBONY 0.1252 0.1252 0.1252 0.1252 19 1200 WOOD 1 0 1 N/A 0 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
19 50 50 BLOCK_PLANK_BIRCH 0.1252 0.1252 0.1252 0.1252 15 670 WOOD 1 0 1 N/A 0 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
20 51 51 BLOCK_PLANK_BLOODROSE 0.1252 0.1252 0.1252 0.1252 17 900 WOOD 1 0 1 N/A 0 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
21 64 64 BLOCK_TRUNK_NORMAL 0.1252 0.1252 0.1252 0.1252 16 740 WOOD 1 0 0 0 N/A 0 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
22 65 65 BLOCK_TRUNK_EBONY 0.1252 0.1252 0.1252 0.1252 19 1200 WOOD 1 0 0 0 N/A 0 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
23 66 66 BLOCK_TRUNK_BIRCH 0.1252 0.1252 0.1252 0.1252 15 670 WOOD 1 0 0 0 N/A 0 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
24 67 67 BLOCK_TRUNK_BLOODROSE 0.1252 0.1252 0.1252 0.1252 17 900 WOOD 1 0 0 0 N/A 0 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
25 80 80 BLOCK_SAND 0.1252 0.1252 0.1252 0.1252 24 2400 SAND 1 0 0 0 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
26 81 81 BLOCK_SAND_WHITE 0.1252 0.1252 0.1252 0.1252 24 2400 SAND 1 0 0 0 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
27 82 82 BLOCK_SAND_RED 0.1252 0.1252 0.1252 0.1252 24 2400 SAND 1 0 0 0 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A