mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-06-22 00:37:35 +08:00
use block.properties template
This commit is contained in:
@ -427,22 +427,22 @@ void main() {
|
||||
|
||||
#ifdef AEROCHROME_MODE
|
||||
float gray = dot(Albedo.rgb, vec3(0.2, 1.0, 0.07));
|
||||
if(blockID == 10001 || blockID == 10003 || blockID == 10004 || blockID == 10006 || blockID == 10009) {
|
||||
if(blockID == BLOCK_GROUND_WAVING || blockID == BLOCK_AIR_WAVING || blockID == BLOCK_SSS_STRONG || blockID == BLOCK_SSS_WEAK || blockID == BLOCK_GROUND_WAVING_VERTICAL) {
|
||||
// IR Reflective (Pink-red)
|
||||
Albedo.rgb = mix(vec3(gray), aerochrome_color, 0.7);
|
||||
}
|
||||
else if(blockID == 10008) {
|
||||
else if(blockID == BLOCK_GRASS) {
|
||||
// Special handling for grass block
|
||||
float strength = 1.0 - color.b;
|
||||
Albedo.rgb = mix(Albedo.rgb, aerochrome_color, strength);
|
||||
}
|
||||
#ifdef AEROCHROME_WOOL_ENABLED
|
||||
else if(blockID == 200) {
|
||||
else if(blockID == BLOCK_SSS_WEAK_2) {
|
||||
// Wool
|
||||
Albedo.rgb = mix(Albedo.rgb, aerochrome_color, 0.3);
|
||||
}
|
||||
#endif
|
||||
else if(blockID == 8 || (blockID >= 1200 && blockID < 1300))
|
||||
else if(blockID == BLOCK_WATER || (blockID >= 1200 && blockID < 1300))
|
||||
{
|
||||
// IR Absorbsive? Dark.
|
||||
Albedo.rgb = mix(Albedo.rgb, vec3(0.01, 0.08, 0.15), 0.5);
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user