mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-19 23:57:22 +08:00
add door masks
This commit is contained in:
parent
d8b5c989e8
commit
d8eb958a28
File diff suppressed because one or more lines are too long
@ -52,3 +52,15 @@
|
||||
#define BLOCK_GLASS_RED 1233
|
||||
#define BLOCK_GLASS_WHITE 1234
|
||||
#define BLOCK_GLASS_YELLOW 1235
|
||||
|
||||
#define BLOCK_DOOR_N 1301
|
||||
#define BLOCK_DOOR_E 1302
|
||||
#define BLOCK_DOOR_S 1303
|
||||
#define BLOCK_DOOR_W 1304
|
||||
|
||||
#define BLOCK_TRAPDOOR_BOTTOM 1305
|
||||
#define BLOCK_TRAPDOOR_TOP 1306
|
||||
#define BLOCK_TRAPDOOR_N 1307
|
||||
#define BLOCK_TRAPDOOR_E 1308
|
||||
#define BLOCK_TRAPDOOR_S 1309
|
||||
#define BLOCK_TRAPDOOR_W 1310
|
||||
|
@ -11,9 +11,13 @@ const ivec3 workGroups = ivec3(4, 5, 1);
|
||||
#ifdef IS_LPV_ENABLED
|
||||
#include "/lib/blocks.glsl"
|
||||
#include "/lib/lpv_blocks.glsl"
|
||||
#endif
|
||||
|
||||
const vec3 LightColor_SeaPickle = vec3(0.283, 0.394, 0.212);
|
||||
const vec3 LightColor_SeaPickle = vec3(0.283, 0.394, 0.212);
|
||||
|
||||
uint BuildLpvMask(const in uint north, const in uint east, const in uint south, const in uint west, const in uint up, const in uint down) {
|
||||
return east | (west << 1) | (down << 2) | (up << 3) | (south << 4) | (north << 5);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void main() {
|
||||
@ -218,6 +222,24 @@ void main() {
|
||||
tintColor = vec3(0.965, 0.965, 0.123);
|
||||
mixWeight = 1.0;
|
||||
break;
|
||||
|
||||
|
||||
case BLOCK_DOOR_N:
|
||||
mixMask = BuildLpvMask(0u, 1u, 1u, 1u, 1u, 1u);
|
||||
mixWeight = 1.0;
|
||||
break;
|
||||
case BLOCK_DOOR_E:
|
||||
mixMask = BuildLpvMask(1u, 0u, 1u, 1u, 1u, 1u);
|
||||
mixWeight = 1.0;
|
||||
break;
|
||||
case BLOCK_DOOR_S:
|
||||
mixMask = BuildLpvMask(1u, 1u, 0u, 1u, 1u, 1u);
|
||||
mixWeight = 1.0;
|
||||
break;
|
||||
case BLOCK_DOOR_W:
|
||||
mixMask = BuildLpvMask(1u, 1u, 1u, 0u, 1u, 1u);
|
||||
mixWeight = 1.0;
|
||||
break;
|
||||
}
|
||||
|
||||
LpvBlockData block;
|
||||
|
Loading…
x
Reference in New Issue
Block a user