use block.properties template

This commit is contained in:
NULL511
2024-05-03 13:39:05 -04:00
parent 2c383a7720
commit 8a923d8e6e
7 changed files with 244 additions and 166 deletions

View File

@ -2,6 +2,7 @@
#include "/lib/settings.glsl"
#include "/lib/res_params.glsl"
#include "/lib/bokeh.glsl"
#include "/lib/blocks.glsl"
/*
!! DO NOT REMOVE !!
@ -229,7 +230,7 @@ void main() {
blockID = mc_Entity.x;
// velocity = at_velocity;
if(mc_Entity.x == 10009) normalMat.a = 0.60;
if(mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL) normalMat.a = 0.60;
PORTAL = 0;
@ -259,7 +260,7 @@ void main() {
#endif
if(mc_Entity.x == 10003) normalMat.a = 0.55;
if(mc_Entity.x == BLOCK_AIR_WAVING) normalMat.a = 0.55;
/////// ----- EMISSIVE STUFF ----- ///////
EMISSIVE = 0.0;
@ -292,14 +293,14 @@ void main() {
/////// ----- SSS ON BLOCKS ----- ///////
// strong
if(mc_Entity.x == 10001 || mc_Entity.x == 10003 || mc_Entity.x == 10004 || mc_Entity.x == 10009) SSSAMOUNT = 1.0;
if(mc_Entity.x == BLOCK_GROUND_WAVING || mc_Entity.x == BLOCK_AIR_WAVING || mc_Entity.x == BLOCK_SSS_STRONG || mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL) SSSAMOUNT = 1.0;
// medium
if(mc_Entity.x == 10006 || mc_Entity.x == 200) SSSAMOUNT = 0.75;
if(mc_Entity.x == BLOCK_SSS_WEAK || mc_Entity.x == BLOCK_SSS_WEAK_2) SSSAMOUNT = 0.75;
// low
#ifdef MISC_BLOCK_SSS
if(mc_Entity.x == 10007 || mc_Entity.x == 10008) SSSAMOUNT = 0.5; // weird SSS on blocks like grass and stuff
if(mc_Entity.x == BLOCK_SSS_WEIRD || mc_Entity.x == BLOCK_GRASS) SSSAMOUNT = 0.5; // weird SSS on blocks like grass and stuff
#endif
#ifdef ENTITIES
@ -320,7 +321,7 @@ void main() {
// strong
// medium
if(blockEntityId == 10010) SSSAMOUNT = 0.4;
if(blockEntityId == BLOCK_SSS_WEAK_3) SSSAMOUNT = 0.4;
// low
@ -330,13 +331,13 @@ void main() {
#ifdef WAVY_PLANTS
bool istopv = gl_MultiTexCoord0.t < mc_midTexCoord.t;
if ((mc_Entity.x == 10001 || mc_Entity.x == 10009) && istopv && abs(position.z) < 64.0) {
if ((mc_Entity.x == BLOCK_GROUND_WAVING || mc_Entity.x == BLOCK_GROUND_WAVING_VERTICAL) && istopv && abs(position.z) < 64.0) {
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz + cameraPosition;
worldpos.xyz += calcMovePlants(worldpos.xyz)*lmtexcoord.w - cameraPosition;
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
}
if (mc_Entity.x == 10003 && abs(position.z) < 64.0) {
if (mc_Entity.x == BLOCK_AIR_WAVING && abs(position.z) < 64.0) {
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz + cameraPosition;
worldpos.xyz += calcMoveLeaves(worldpos.xyz, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*lmtexcoord.w - cameraPosition;
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;