first commit
This commit is contained in:
+123
@@ -0,0 +1,123 @@
|
||||
if (blockEntityId < 5028) {
|
||||
if (blockEntityId < 5012) {
|
||||
if (blockEntityId < 5004) {
|
||||
if (blockEntityId == 5000) { //
|
||||
|
||||
} else { // blockEntityId < 5000
|
||||
|
||||
}
|
||||
} else {
|
||||
if (blockEntityId == 5004) { // Signs
|
||||
noSmoothLighting = true;
|
||||
|
||||
if (glColor.r + glColor.g + glColor.b <= 2.99 || lmCoord.x > 0.999) { // Sign Text
|
||||
#include "/lib/materials/specificMaterials/others/signText.glsl"
|
||||
}
|
||||
|
||||
#ifdef COATED_TEXTURES
|
||||
noiseFactor = 0.66;
|
||||
#endif
|
||||
} else /*if (blockEntityId == 5008)*/ { // Chest
|
||||
noSmoothLighting = true;
|
||||
|
||||
smoothnessG = pow2(color.g);
|
||||
|
||||
#ifdef COATED_TEXTURES
|
||||
noiseFactor = 0.66;
|
||||
#endif
|
||||
redstoneIPBR(color.rgb, emission);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (blockEntityId < 5020) {
|
||||
if (blockEntityId == 5012) { // Ender Chest
|
||||
noSmoothLighting = true;
|
||||
|
||||
float factor = min(pow2(color.g), 0.25);
|
||||
smoothnessG = factor * 2.0;
|
||||
|
||||
if (color.g > color.r || color.b > color.g)
|
||||
emission = pow2(factor) * 20.0;
|
||||
emission += 0.35;
|
||||
#if SEASONS == 1 || SEASONS == 4 || defined MOSS_NOISE_INTERNAL || defined SAND_NOISE_INTERNAL
|
||||
overlayNoiseIntensity = 0.7;
|
||||
if (dot(normal, upVec) > 0.99) {
|
||||
#if SNOW_CONDITION < 2 && SNOW_CONDITION != 0
|
||||
emission = mix(emission, emission * 0.8, inSnowy);
|
||||
#elif SNOW_CONDITION == 0
|
||||
emission = mix(emission, emission * 0.8, rainFactor * inSnowy);
|
||||
#else
|
||||
emission *= 0.8;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef COATED_TEXTURES
|
||||
noiseFactor = 0.66;
|
||||
#endif
|
||||
} else /*if (blockEntityId == 5016)*/ { // Shulker Box+, Banner+, Head+, Bed+
|
||||
noSmoothLighting = true;
|
||||
#ifdef COATED_TEXTURES
|
||||
noiseFactor = 0.2;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
if (blockEntityId == 5020) { // Conduit
|
||||
noSmoothLighting = true;
|
||||
lmCoordM.x = 0.9;
|
||||
|
||||
if (color.b > color.r) { // Conduit:Wind, Conduit:Blue Pixels of The Eye
|
||||
emission = color.r * 16.0;
|
||||
} else if (color.r > color.b * 2.5) { // Conduit:Red Pixels of The Eye
|
||||
emission = 20.0;
|
||||
color.rgb *= vec3(1.0, 0.25, 0.1);
|
||||
}
|
||||
overlayNoiseIntensity = 0.3;
|
||||
} else /*if (blockEntityId == 5024)*/ { // End Portal, End Gateway
|
||||
#ifdef SPECIAL_PORTAL_EFFECTS
|
||||
#include "/lib/materials/specificMaterials/others/endPortalEffect.glsl"
|
||||
#endif
|
||||
overlayNoiseIntensity = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (blockEntityId < 5044) {
|
||||
if (blockEntityId < 5036) {
|
||||
if (blockEntityId == 5028) { // Bell
|
||||
if (color.r + color.g > color.b + 0.5) { // Bell:Golden Part
|
||||
#include "/lib/materials/specificMaterials/terrain/goldBlock.glsl"
|
||||
} else {
|
||||
#include "/lib/materials/specificMaterials/terrain/stone.glsl"
|
||||
}
|
||||
} else /*if (blockEntityId == 5032)*/ { // Copper Chest+, Copper Golem+
|
||||
#include "/lib/materials/specificMaterials/terrain/copperBlock.glsl"
|
||||
}
|
||||
} else {
|
||||
if (blockEntityId == 5036) { //
|
||||
|
||||
} else /*if (blockEntityId == 5040)*/ { //
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (blockEntityId < 5052) {
|
||||
if (blockEntityId == 5044) { //
|
||||
|
||||
} else /*if (blockEntityId == 5048)*/ { //
|
||||
|
||||
}
|
||||
} else {
|
||||
if (blockEntityId == 5052) { //
|
||||
|
||||
} else if (blockEntityId == 10548) { // Enchanting Table:Book
|
||||
smoothnessG = pow2(color.g) * 0.35;
|
||||
|
||||
if (color.b < 0.0001 && color.r > color.g) {
|
||||
emission = color.g * 3.5;
|
||||
}
|
||||
overlayNoiseIntensity = 0.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
#ifdef POM
|
||||
#include "/lib/materials/materialMethods/pomEffects.glsl"
|
||||
#endif
|
||||
|
||||
#include "/lib/materials/materialMethods/customEmission.glsl"
|
||||
|
||||
void GetCustomMaterials(inout vec4 color, inout vec3 normalM, inout vec2 lmCoordM, inout float NdotU, inout vec3 shadowMult, inout float smoothnessG, inout float smoothnessD, inout float highlightMult, inout float emission, inout float materialMask, vec3 viewPos, float lViewPos) {
|
||||
vec2 texCoordM = texCoord;
|
||||
|
||||
#ifdef POM
|
||||
float parallaxFade, parallaxTexDepth;
|
||||
vec2 parallaxLocalCoord;
|
||||
vec3 parallaxTraceCoordDepth;
|
||||
vec4 normalMap;
|
||||
bool skipPom = false;
|
||||
|
||||
if (!skipPom) {
|
||||
texCoordM = vTexCoord.xy * vTexCoordAM.zw + vTexCoordAM.xy;
|
||||
|
||||
parallaxFade = pow2(lViewPos / POM_DISTANCE);
|
||||
#ifdef GBUFFERS_ENTITIES
|
||||
if (entityId == 50008) parallaxFade = 1.1; // Item Frame, Glow Item Frame
|
||||
#endif
|
||||
#ifdef GBUFFERS_BLOCK
|
||||
if (blockEntityId == 5004) parallaxFade = 1.1; // Signs
|
||||
#endif
|
||||
#ifdef GBUFFERS_HAND
|
||||
if (heldItemId == 40004 || heldItemId2 == 40004) parallaxFade = 1.1; // Filled Map
|
||||
#endif
|
||||
|
||||
parallaxTraceCoordDepth = vec3(texCoordM, 1.0);
|
||||
parallaxLocalCoord = vTexCoord.st;
|
||||
|
||||
normalMap = ReadNormal(vTexCoord.st);
|
||||
parallaxFade += pow(normalMap.a, 64.0);
|
||||
|
||||
if (parallaxFade < 1.0) {
|
||||
float dither = Bayer64(gl_FragCoord.xy);
|
||||
#ifdef TAA
|
||||
dither = fract(dither + goldenRatio * mod(float(frameCounter), 3600.0));
|
||||
#endif
|
||||
|
||||
parallaxLocalCoord = GetParallaxCoord(parallaxFade, dither, texCoordM, parallaxTexDepth, parallaxTraceCoordDepth);
|
||||
|
||||
normalMap = textureGrad(normals, texCoordM, dcdx, dcdy);
|
||||
color = textureGrad(tex, texCoordM, dcdx, dcdy);
|
||||
#if !defined GBUFFERS_ENTITIES && !defined GBUFFERS_BLOCK
|
||||
color.rgb *= glColor.rgb;
|
||||
#else
|
||||
color *= glColor;
|
||||
#endif
|
||||
|
||||
shadowMult *= GetParallaxShadow(parallaxFade, dither, normalMap.a, parallaxLocalCoord, lightVec, tbnMatrix);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Normal Map
|
||||
#if NORMAL_MAP_STRENGTH != 0
|
||||
#ifdef POM
|
||||
else normalMap = texture2D(normals, texCoordM);
|
||||
#else
|
||||
vec4 normalMap = texture2D(normals, texCoordM);
|
||||
#endif
|
||||
|
||||
normalM = normalMap.xyz;
|
||||
normalM += vec3(0.5, 0.5, 0.0);
|
||||
normalM = pow(normalM, vec3(NORMAL_MAP_STRENGTH * 0.007)); // 70% strength by default
|
||||
normalM -= vec3(0.5, 0.5, 0.0);
|
||||
normalM = normalM * 2.0 - 1.0;
|
||||
|
||||
#if RP_MODE == 3 // labPBR
|
||||
if (normalM.x + normalM.y > -1.999) {
|
||||
if (length(normalM.xy) > 1.0) normalM.xy = normalize(normalM.xy);
|
||||
normalM.z = sqrt(1.0 - dot(normalM.xy, normalM.xy));
|
||||
normalM.xyz = normalize(clamp(normalM.xyz, vec3(-1.0), vec3(1.0)));
|
||||
} else normalM = vec3(0.0, 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
#if defined POM && POM_QUALITY >= 128 && POM_LIGHTING_MODE == 2
|
||||
if (!skipPom) {
|
||||
float slopeThreshold = max(1.0 / POM_QUALITY, 1.0/255.0);
|
||||
if (parallaxTexDepth - parallaxTraceCoordDepth.z > slopeThreshold) {
|
||||
vec3 slopeNormal = GetParallaxSlopeNormal(parallaxLocalCoord, parallaxTraceCoordDepth.z, viewVector);
|
||||
normalM = mix(normalM, slopeNormal, 0.5 * pow2(max0(1.0 - parallaxFade * 2.0)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
normalM = clamp(normalize(normalM * tbnMatrix), vec3(-1.0), vec3(1.0));
|
||||
|
||||
NdotU = dot(normalM, upVec);
|
||||
NdotUmax0 = max0(NdotU);
|
||||
#endif
|
||||
|
||||
#if DIRECTIONAL_BLOCKLIGHT > 0
|
||||
mat3 lightmapTBN = mat3(normalize(dFdx(viewPos)), normalize(dFdy(viewPos)), vec3(0.0));
|
||||
lightmapTBN[2] = cross(lightmapTBN[0], lightmapTBN[1]);
|
||||
|
||||
float lmCoordXDir = lmCoordM.x;
|
||||
vec2 deriv = vec2(dFdx(lmCoordXDir), dFdy(lmCoordXDir)) * 256.0;
|
||||
vec3 dir = normalize(vec3(deriv.x * lightmapTBN[0] +
|
||||
0.0005 * lightmapTBN[2] +
|
||||
deriv.y * lightmapTBN[1]));
|
||||
|
||||
float pwr = clamp(dot(normalM, dir), -1.0, 1.0);
|
||||
float absPwr = abs(pwr);
|
||||
if (absPwr > 0.0) pwr = pow(absPwr, 9.0 / DIRECTIONAL_BLOCKLIGHT) * sign(pwr) * lmCoordXDir;
|
||||
if (length(deriv) > 0.001) lmCoordXDir = pow(max(lmCoordXDir, 0.00001), 1.0 - pwr);
|
||||
|
||||
lmCoordM.x = mix(lmCoordM.x, lmCoordXDir, 0.01 * max0(100.0 - pow2(lViewPos)));
|
||||
#endif
|
||||
|
||||
// Specular Map
|
||||
vec4 specularMap = texture2D(specular, texCoordM);
|
||||
|
||||
float smoothnessM = pow2(specularMap.r);
|
||||
smoothnessG = smoothnessM;
|
||||
smoothnessD = smoothnessM;
|
||||
highlightMult = 1.0 + 2.5 * specularMap.r;
|
||||
|
||||
#if RP_MODE == 3 // labPBR
|
||||
highlightMult *= 0.5 + 0.5 * specularMap.g;
|
||||
#endif
|
||||
|
||||
emission = GetCustomEmission(specularMap, texCoordM);
|
||||
|
||||
#ifndef GBUFFERS_WATER
|
||||
#if defined GBUFFERS_ENTITIES || defined GBUFFERS_HAND
|
||||
if (
|
||||
materialMask > OSIEBCA * 240.1
|
||||
&& specularMap.g < 0.01
|
||||
) return;
|
||||
#endif
|
||||
|
||||
#if RP_MODE == 2 // seuspbr
|
||||
materialMask = specularMap.g * OSIEBCA * 240.0;
|
||||
#elif RP_MODE == 3 // labPBR
|
||||
if (specularMap.g < OSIEBCA * 229.1) {
|
||||
materialMask = specularMap.g * OSIEBCA * 214.0;
|
||||
} else {
|
||||
materialMask = specularMap.g - OSIEBCA * 15.0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
if (abs(materialMaskInt - 149.5) < 50.0) { // Entity Reflection Handling (see common.glsl for details)
|
||||
materialMaskInt -= 100;
|
||||
entityOrParticle = true;
|
||||
}
|
||||
|
||||
if (materialMaskInt != 0) {
|
||||
if (materialMaskInt < 9) {
|
||||
if (materialMaskInt < 5) {
|
||||
if (materialMaskInt < 3) {
|
||||
if (materialMaskInt == 1) { // Intense Fresnel
|
||||
intenseFresnel = 1.0;
|
||||
} else /*if (materialMaskInt == 2)*/ { // Copper Fresnel
|
||||
intenseFresnel = 1.0;
|
||||
reflectColor = mix(vec3(0.5, 0.75, 0.5), vec3(1.0, 0.45, 0.3), sqrt1(smoothnessD));
|
||||
}
|
||||
} else {
|
||||
if (materialMaskInt == 3) { // Gold Fresnel
|
||||
intenseFresnel = 1.0;
|
||||
reflectColor = vec3(1.0, 0.8, 0.5);
|
||||
} else /*if (materialMaskInt == 4)*/ { //
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (materialMaskInt < 7) {
|
||||
if (materialMaskInt == 5) { // Redstone Fresnel
|
||||
intenseFresnel = 1.0;
|
||||
reflectColor = vec3(1.0, 0.3, 0.2);
|
||||
} else /*if (materialMaskInt == 6)*/ { //
|
||||
|
||||
}
|
||||
} else {
|
||||
if (materialMaskInt == 7) { //
|
||||
|
||||
} else /*if (materialMaskInt == 8)*/ { //
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (materialMaskInt < 13) {
|
||||
if (materialMaskInt < 11) {
|
||||
if (materialMaskInt == 9) { //
|
||||
|
||||
} else /*if (materialMaskInt == 10)*/ { //
|
||||
|
||||
}
|
||||
} else {
|
||||
if (materialMaskInt == 11) { //
|
||||
|
||||
} else /*if (materialMaskInt == 12)*/ { //
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (materialMaskInt < 15) {
|
||||
if (materialMaskInt == 13) { //
|
||||
|
||||
} else /*if (materialMaskInt == 14)*/ { //
|
||||
|
||||
}
|
||||
} else {
|
||||
if (materialMaskInt == 15) { //
|
||||
|
||||
} else { // materialMaskInt >= 16 && <= 240
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
if (materialMaskInt <= 240) {
|
||||
#ifdef IPBR
|
||||
#include "/lib/materials/materialHandling/deferredIPBR.glsl"
|
||||
#elif defined CUSTOM_PBR
|
||||
#if RP_MODE == 2 // seuspbr
|
||||
float metalness = materialMaskInt / 240.0;
|
||||
|
||||
intenseFresnel = metalness;
|
||||
#elif RP_MODE == 3 // labPBR
|
||||
float metalness = float(materialMaskInt >= 215);
|
||||
|
||||
intenseFresnel = materialMaskInt / 240.0;
|
||||
#endif
|
||||
reflectColor = mix(vec3(1.0), color.rgb / (max(color.r, max(color.g, color.b)) + 0.00001), metalness);
|
||||
#endif
|
||||
} else {
|
||||
if (materialMaskInt == 251) { // No SSAO, Reduce Reflection
|
||||
entityOrParticle = true;
|
||||
} else if (materialMaskInt == 254) { // No SSAO, No TAA, Reduce Reflection
|
||||
ssao = 1.0;
|
||||
entityOrParticle = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,498 @@
|
||||
#include "/lib/shaderSettings/entityMaterials.glsl"
|
||||
if (entityId < 50128) { // 50000 to 50128
|
||||
if (entityId < 50064) { // 50000 to 50064
|
||||
if (entityId < 50032) { // 50000 to 50032
|
||||
if (entityId < 50016) { // 50000 to 50016
|
||||
if (entityId < 50008) { // 50000 to 50008
|
||||
if (entityId == 50000) { // End Crystal
|
||||
lmCoordM.x *= 0.7;
|
||||
|
||||
if (color.g * 1.2 < color.r) {
|
||||
emission = 12.0 * color.g;
|
||||
color.r *= 1.1;
|
||||
}
|
||||
emission *= END_CRYSTAL_EMISSION;
|
||||
} else if (entityId == 50004) { // Lightning Bolt
|
||||
#include "/lib/materials/specificMaterials/others/lightningBolt.glsl"
|
||||
}
|
||||
} else { // 50008 to 50016
|
||||
if (entityId == 50008) { // Item Frame, Glow Item Frame
|
||||
noSmoothLighting = true;
|
||||
} else if (entityId == 50012) { // Iron Golem
|
||||
#include "/lib/materials/specificMaterials/terrain/ironBlock.glsl"
|
||||
|
||||
smoothnessD *= 0.4;
|
||||
} else { // 50015 - Armor Stand
|
||||
// Do nothing for now
|
||||
}
|
||||
}
|
||||
} else { // 50016 to 50032
|
||||
if (entityId < 50024) { // 50016 to 50024
|
||||
if (entityId == 50016 || entityId == 50017) { // Player
|
||||
if (entityColor.a < 0.001) {
|
||||
#ifdef COATED_TEXTURES
|
||||
noiseFactor = 0.5;
|
||||
#endif
|
||||
|
||||
if (CheckForColor(texelFetch(tex, ivec2(0, 0), 0).rgb, vec3(23, 46, 92))) {
|
||||
for (int i = 63; i >= 56; i--) {
|
||||
vec3 dif = color.rgb - texelFetch(tex, ivec2(i, 0), 0).rgb;
|
||||
if (dif == clamp(dif, vec3(-0.001), vec3(0.001))) {
|
||||
emission = 2.0 * texelFetch(tex, ivec2(i, 1), 0).r;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool selfCheck = false;
|
||||
#if IRIS_VERSION >= 10800
|
||||
if (entityId == 50017) {
|
||||
selfCheck = true;
|
||||
entitySSBLMask = 0.0;
|
||||
}
|
||||
#else
|
||||
if (length(playerPos) < 4.0) {
|
||||
selfCheck = true;
|
||||
entitySSBLMask = 0.0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else /*if (entityId == 50020)*/ { // Blaze
|
||||
lmCoordM = vec2(0.9, 0.0);
|
||||
emission = min(color.r, 0.7) * 1.4;
|
||||
|
||||
float dotColor = dot(color.rgb, color.rgb);
|
||||
if (abs(dotColor - 1.5) > 1.4) {
|
||||
emission = 5.0;
|
||||
} else {
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else { // 50024 to 50032
|
||||
if (entityId == 50024) { // Creeper
|
||||
emission = max0(color.b - color.g - color.r) * 10.0;
|
||||
} else /*if (entityId == 50028)*/ { // Drowned
|
||||
if (atlasSize.x < 900) {
|
||||
if (CheckForColor(color.rgb, vec3(143, 241, 215)) ||
|
||||
CheckForColor(color.rgb, vec3( 49, 173, 183)) ||
|
||||
CheckForColor(color.rgb, vec3(101, 224, 221))) emission = 2.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50032 to 50064
|
||||
if (entityId < 50048) { // 50032 to 50048
|
||||
if (entityId < 50040) { // 50032 to 50040
|
||||
if (entityId == 50032) { // Guardian
|
||||
vec3 absDif = abs(vec3(color.r - color.g, color.g - color.b, color.r - color.b));
|
||||
float maxDif = max(absDif.r, max(absDif.g, absDif.b));
|
||||
if (maxDif < 0.1 && color.b > 0.5 && color.b < 0.88) {
|
||||
emission = pow2(pow1_5(color.b)) * 5.0;
|
||||
color.rgb *= color.rgb;
|
||||
}
|
||||
} else /*if (entityId == 50036)*/ { // Elder Guardian
|
||||
if (CheckForColor(color.rgb, vec3(203, 177, 165)) ||
|
||||
CheckForColor(color.rgb, vec3(214, 155, 126))) {
|
||||
emission = pow2(pow1_5(color.b)) * 10.0;
|
||||
color.r *= 1.2;
|
||||
}
|
||||
}
|
||||
} else { // 50040 to 50048
|
||||
if (entityId == 50040) { // Endermite
|
||||
if (CheckForColor(color.rgb, vec3(87, 23, 50))) {
|
||||
emission = 8.0;
|
||||
color.rgb *= color.rgb;
|
||||
}
|
||||
} else /*if (entityId == 50044)*/ { // Ghast
|
||||
if (entityColor.a < 0.001)
|
||||
emission = max0(color.r - color.g - color.b) * 6.0;
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
if (color.r > color.b * 2.0) color.rgb = changeColorFunction(color.rgb, 7.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
if (color.r > color.b * 2.0) color.rgb = changeColorFunction(color.rgb, 7.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else { // 50048 to 50064
|
||||
if (entityId < 50056) { // 50048 to 50056
|
||||
if (entityId == 50048) { // Glow Squid
|
||||
lmCoordM.x = 0.0;
|
||||
float dotColor = dot(color.rgb, color.rgb);
|
||||
emission = pow2(pow2(min(dotColor * 0.65, 1.5))) + 0.45;
|
||||
} else /*if (entityId == 50052)*/ { // Magma Cube
|
||||
emission = color.g * 6.0;
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
}
|
||||
} else { // 50056 to 50064
|
||||
if (entityId == 50056) { // Stray
|
||||
if (CheckForColor(color.rgb, vec3(230, 242, 246)) && texCoord.y > 0.35)
|
||||
emission = 1.75;
|
||||
} else /*if (entityId == 50060)*/ { // Vex
|
||||
lmCoordM = vec2(0.0);
|
||||
emission = pow2(pow2(color.r)) * 3.5 + 0.5;
|
||||
color.a *= color.a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50064 to 50128
|
||||
if (entityId < 50096) { // 50064 to 50096
|
||||
if (entityId < 50080) { // 50064 to 50080
|
||||
if (entityId < 50072) { // 50064 to 50072
|
||||
if (entityId == 50064) { // Witch
|
||||
emission = 2.0 * color.g * float(color.g * 1.5 > color.b + color.r);
|
||||
} else /*if (entityId == 50068)*/ { // Wither, Wither Skull
|
||||
lmCoordM.x = 0.9;
|
||||
emission = 3.0 * float(dot(color.rgb, color.rgb) > 1.0);
|
||||
}
|
||||
} else { // 50072 to 50080
|
||||
if (entityId == 50072) { // Experience Orb
|
||||
emission = 7.5;
|
||||
|
||||
color.rgb *= color.rgb;
|
||||
} else /*if (entityId == 50076)*/ { // Boats
|
||||
playerPos.y += 0.38; // consistentBOAT2176: to avoid water shadow and the black inner shadow bug
|
||||
}
|
||||
}
|
||||
} else { // 50080 to 50096
|
||||
if (entityId < 50088) { // 50080 to 50088
|
||||
if (entityId == 50080) { // Allay
|
||||
if (atlasSize.x < 900) {
|
||||
lmCoordM = vec2(0.0);
|
||||
emission = float(color.r > 0.9 && color.b > 0.9) * 5.0 + color.g;
|
||||
} else {
|
||||
lmCoordM.x = 0.8;
|
||||
}
|
||||
} else /*if (entityId == 50084)*/ { // Slime, Chicken
|
||||
//only code is in Vertex Shader for now
|
||||
}
|
||||
} else { // 50088 to 50096
|
||||
if (entityId == 50088) { // Entity Flame (Iris Feature)
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 3.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 3.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
emission = 1.3;
|
||||
} else if (entityId == 50089) { // fireball, small fireball, dragon fireball
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 4.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 4.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
} else /*if (entityId == 50092)*/ { // Trident Entity
|
||||
#if defined IS_IRIS || defined IS_ANGELICA && ANGELICA_VERSION >= 20000008
|
||||
// Only on Iris, because otherwise it would be inconsistent with the Trident item
|
||||
#include "/lib/materials/specificMaterials/others/trident.glsl"
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50096 to 50128
|
||||
if (entityId < 50112) { // 50096 to 50112
|
||||
if (entityId < 50104) { // 50096 to 50104
|
||||
if (entityId == 50096) { // Minecart++
|
||||
if (atlasSize.x < 900 && color.r * color.g * color.b + color.b > 0.3) {
|
||||
#include "/lib/materials/specificMaterials/terrain/ironBlock.glsl"
|
||||
|
||||
smoothnessD *= 0.6;
|
||||
}
|
||||
} else /*if (entityId == 50100)*/ { // Bogged
|
||||
if (CheckForColor(color.rgb, vec3(239, 254, 194)))
|
||||
emission = 2.5;
|
||||
}
|
||||
} else { // 50104 to 50112
|
||||
if (entityId == 50104) { // Piglin++, Hoglin+
|
||||
if (atlasSize.x < 900) {
|
||||
if (CheckForColor(color.rgb, vec3(255)) || CheckForColor(color.rgb, vec3(255, 242, 246))) {
|
||||
vec2 tSize = textureSize(tex, 0);
|
||||
vec4 checkColorOneRight = texelFetch(tex, ivec2(texCoord * tSize) + ivec2(1, 0), 0);
|
||||
if (
|
||||
CheckForColor(checkColorOneRight.rgb, vec3(201, 130, 101)) ||
|
||||
CheckForColor(checkColorOneRight.rgb, vec3(241, 158, 152)) ||
|
||||
CheckForColor(checkColorOneRight.rgb, vec3(223, 127, 119)) ||
|
||||
CheckForColor(checkColorOneRight.rgb, vec3(241, 158, 152)) ||
|
||||
CheckForColor(checkColorOneRight.rgb, vec3(165, 99, 80)) ||
|
||||
CheckForColor(checkColorOneRight.rgb, vec3(213, 149, 122)) ||
|
||||
CheckForColor(checkColorOneRight.rgb, vec3(255))
|
||||
) {
|
||||
emission = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else /*if (entityId == 50108)*/ { // Creaking
|
||||
if (color.r > 0.7 && color.r > color.g * 1.2 && color.g > color.b * 2.0) { // Eyes
|
||||
lmCoordM.x = 0.5;
|
||||
emission = 5.0 * color.g;
|
||||
color.rgb *= color.rgb;
|
||||
purkinjeOverwrite = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50112 to 50128
|
||||
if (entityId < 50120) { // 50112 to 50120
|
||||
if (entityId == 50112) { // Name Tag
|
||||
noDirectionalShading = true;
|
||||
color.rgb *= 1.5;
|
||||
if (color.a < 0.5) {
|
||||
color.a = 0.12;
|
||||
color.rgb *= 5.0;
|
||||
}
|
||||
} else /*if (entityId == 50116)*/ { // Copper Golem
|
||||
#include "/lib/materials/specificMaterials/terrain/copperBlock.glsl"
|
||||
|
||||
smoothnessD *= 0.5;
|
||||
}
|
||||
} else { // 50120 to 50128
|
||||
if (entityId == 50120) { // Parched
|
||||
if (CheckForColor(color.rgb, vec3(254, 235, 194))) {
|
||||
vec2 tSize = textureSize(tex, 0);
|
||||
vec4 checkColorOneDown = texelFetch(tex, ivec2(texCoord * tSize) + ivec2(0, 1), 0);
|
||||
if (CheckForColor(checkColorOneDown.rgb, vec3(135, 126, 118)) ||
|
||||
CheckForColor(checkColorOneDown.rgb, vec3(106, 103, 98))
|
||||
) {
|
||||
emission = 1.75;
|
||||
}
|
||||
}
|
||||
} else /*if (entityId == 50124)*/ { // Zombie Nautilus
|
||||
if (CheckForColor(color.rgb, vec3(143, 241, 215)) || CheckForColor(color.rgb, vec3(101, 224, 221)))
|
||||
emission = 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50128 to 50256
|
||||
if (entityId < 50192) { // 50128 to 50192
|
||||
if (entityId < 50160) { // 50128 to 50160
|
||||
if (entityId < 50144) { // 50128 to 50144
|
||||
if (entityId < 50136) { // 50128 to 50136
|
||||
if (entityId < 50132) { // 50128 to 50132
|
||||
// 50128
|
||||
// 50129
|
||||
// 50130
|
||||
// 50131
|
||||
} else { // 50132 to 50136
|
||||
// 50132
|
||||
// 50133
|
||||
// 50134
|
||||
// 50135
|
||||
}
|
||||
} else { // 50136 to 50144
|
||||
if (entityId < 50140) { // 50136 to 50140
|
||||
// 50136
|
||||
// 50137
|
||||
// 50138
|
||||
// 50139
|
||||
} else { // 50140 to 50144
|
||||
// 50140
|
||||
// 50141
|
||||
// 50142
|
||||
// 50143
|
||||
}
|
||||
}
|
||||
} else { // 50144 to 50160
|
||||
if (entityId < 50152) { // 50144 to 50152
|
||||
if (entityId < 50148) { // 50144 to 50148
|
||||
// 50144
|
||||
// 50145
|
||||
// 50146
|
||||
// 50147
|
||||
} else { // 50148 to 50152
|
||||
// 50148
|
||||
// 50149
|
||||
// 50150
|
||||
// 50151
|
||||
}
|
||||
} else { // 50152 to 50160
|
||||
if (entityId < 50156) { // 50152 to 50156
|
||||
// 50152
|
||||
// 50153
|
||||
// 50154
|
||||
// 50155
|
||||
} else { // 50156 to 50160
|
||||
// 50156
|
||||
// 50157
|
||||
// 50158
|
||||
// 50159
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50160 to 50192
|
||||
if (entityId < 50176) { // 50160 to 50176
|
||||
if (entityId < 50168) { // 50160 to 50168
|
||||
if (entityId < 50164) { // 50160 to 50164
|
||||
// 50160
|
||||
// 50161
|
||||
// 50162
|
||||
// 50163
|
||||
} else { // 50164 to 50168
|
||||
// 50164
|
||||
// 50165
|
||||
// 50166
|
||||
// 50167
|
||||
}
|
||||
} else { // 50168 to 50176
|
||||
if (entityId < 50172) { // 50168 to 50172
|
||||
// 50168
|
||||
// 50169
|
||||
// 50170
|
||||
// 50171
|
||||
} else { // 50172 to 50176
|
||||
// 50172
|
||||
// 50173
|
||||
// 50174
|
||||
// 50175
|
||||
}
|
||||
}
|
||||
} else { // 50176 to 50192
|
||||
if (entityId < 50184) { // 50176 to 50184
|
||||
if (entityId < 50180) { // 50176 to 50180
|
||||
// 50176
|
||||
// 50177
|
||||
// 50178
|
||||
// 50179
|
||||
} else { // 50180 to 50184
|
||||
// 50180
|
||||
// 50181
|
||||
// 50182
|
||||
// 50183
|
||||
}
|
||||
} else { // 50184 to 50192
|
||||
if (entityId < 50188) { // 50184 to 50188
|
||||
// 50184
|
||||
// 50185
|
||||
// 50186
|
||||
// 50187
|
||||
} else { // 50188 to 50192
|
||||
// 50188
|
||||
// 50189
|
||||
// 50190
|
||||
// 50191
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50192 to 50256
|
||||
if (entityId < 50224) { // 50192 to 50224
|
||||
if (entityId < 50208) { // 50192 to 50208
|
||||
if (entityId < 50200) { // 50192 to 50200
|
||||
if (entityId < 50196) { // 50192 to 50196
|
||||
// 50192
|
||||
// 50193
|
||||
// 50194
|
||||
// 50195
|
||||
} else { // 50196 to 50200
|
||||
// 50196
|
||||
// 50197
|
||||
// 50198
|
||||
// 50199
|
||||
}
|
||||
} else { // 50200 to 50208
|
||||
if (entityId < 50204) { // 50200 to 50204
|
||||
// 50200
|
||||
// 50201
|
||||
// 50202
|
||||
// 50203
|
||||
} else { // 50204 to 50208
|
||||
// 50204
|
||||
// 50205
|
||||
// 50206
|
||||
// 50207
|
||||
}
|
||||
}
|
||||
} else { // 50208 to 50224
|
||||
if (entityId < 50216) { // 50208 to 50216
|
||||
if (entityId < 50212) { // 50208 to 50212
|
||||
// 50208
|
||||
// 50209
|
||||
// 50210
|
||||
// 50211
|
||||
} else { // 50212 to 50216
|
||||
// 50212
|
||||
// 50213
|
||||
// 50214
|
||||
// 50215
|
||||
}
|
||||
} else { // 50216 to 50224
|
||||
if (entityId < 50220) { // 50216 to 50220
|
||||
// 50216
|
||||
// 50217
|
||||
// 50218
|
||||
// 50219
|
||||
} else { // 50220 to 50224
|
||||
// 50220
|
||||
// 50221
|
||||
// 50222
|
||||
// 50223
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // 50224 to 50256
|
||||
if (entityId < 50240) { // 50224 to 50240
|
||||
if (entityId < 50232) { // 50224 to 50232
|
||||
if (entityId < 50228) { // 50224 to 50228
|
||||
// 50224
|
||||
// 50225
|
||||
// 50226
|
||||
// 50227
|
||||
} else { // 50228 to 50232
|
||||
// 50228
|
||||
// 50229
|
||||
// 50230
|
||||
// 50231
|
||||
}
|
||||
} else { // 50232 to 50240
|
||||
if (entityId < 50236) { // 50232 to 50236
|
||||
// 50232
|
||||
// 50233
|
||||
// 50234
|
||||
// 50235
|
||||
} else { // 50236 to 50240
|
||||
// 50236
|
||||
// 50237
|
||||
// 50238
|
||||
// 50239
|
||||
}
|
||||
}
|
||||
} else { // 50240 to 50256
|
||||
if (entityId < 50248) { // 50240 to 50248
|
||||
if (entityId < 50244) { // 50240 to 50244
|
||||
// 50240
|
||||
// 50241
|
||||
// 50242
|
||||
// 50243
|
||||
} else { // 50244 to 50248
|
||||
// 50244
|
||||
// 50245
|
||||
// 50246
|
||||
// 50247
|
||||
}
|
||||
} else { // 50248 to 50256
|
||||
if (entityId < 50252) { // 50248 to 50252
|
||||
// 50248
|
||||
// 50249
|
||||
// 50250
|
||||
// 50251
|
||||
} else { // 50252 to 50256
|
||||
// 50252
|
||||
// 50253
|
||||
// 50254
|
||||
// 50255
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,265 @@
|
||||
#include "/lib/shaderSettings/entityMaterials.glsl"
|
||||
int mat = currentRenderedItemId;
|
||||
|
||||
#ifdef GBUFFERS_HAND
|
||||
float lViewPos = 0.0;
|
||||
#endif
|
||||
|
||||
int subsurfaceMode;
|
||||
bool centerShadowBias;
|
||||
float noPuddles;
|
||||
|
||||
if (currentRenderedItemId < 45000) {
|
||||
#include "/lib/materials/materialHandling/terrainIPBR.glsl"
|
||||
} else
|
||||
|
||||
if (currentRenderedItemId < 45064) {
|
||||
if (currentRenderedItemId < 45032) {
|
||||
if (currentRenderedItemId < 45016) {
|
||||
if (currentRenderedItemId < 45008) {
|
||||
if (currentRenderedItemId == 45000) { // Armor Trims
|
||||
smoothnessG = 0.5;
|
||||
highlightMult = 2.0;
|
||||
smoothnessD = 0.5;
|
||||
|
||||
#ifdef GLOWING_ARMOR_TRIM
|
||||
emission = 1.0;
|
||||
#endif
|
||||
#ifdef SITUATIONAL_GLOWING_TRIMS
|
||||
emission *= skyLightCheck;
|
||||
#endif
|
||||
} else if (currentRenderedItemId == 45004) { // Wooden Tools, Bow, Fishing Rod
|
||||
#include "/lib/materials/specificMaterials/planks/sprucePlanks.glsl"
|
||||
smoothnessG = min(smoothnessG, 0.4);
|
||||
smoothnessD = smoothnessG;
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45008) { // Stone Tools
|
||||
if (CheckForStick(color.rgb)) {
|
||||
#include "/lib/materials/specificMaterials/planks/sprucePlanks.glsl"
|
||||
} else {
|
||||
#include "/lib/materials/specificMaterials/terrain/stone.glsl"
|
||||
}
|
||||
} else /*if (currentRenderedItemId == 45012)*/ { // Iron Tools, Iron Armor, Iron Ingot, Iron Nugget, Iron Horse Armor, Flint and Steel, Flint, Spyglass, Shears, Chainmail Armor
|
||||
if (CheckForStick(color.rgb)) {
|
||||
#include "/lib/materials/specificMaterials/planks/sprucePlanks.glsl"
|
||||
} else {
|
||||
#include "/lib/materials/specificMaterials/terrain/ironBlock.glsl"
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId < 45024) {
|
||||
if (currentRenderedItemId == 45016) { // Golden Tools, Golden Armor, Gold Ingot, Gold Nugget, Golden Apple, Enchanted Golden Apple, Golden Carrot, Golden Horse Armor
|
||||
if (CheckForStick(color.rgb)) {
|
||||
#include "/lib/materials/specificMaterials/planks/sprucePlanks.glsl"
|
||||
} else {
|
||||
#include "/lib/materials/specificMaterials/terrain/goldBlock.glsl"
|
||||
}
|
||||
} else /*if (currentRenderedItemId == 45020)*/ { // Diamond Tools, Diamond Armor, Diamond, Diamond Horse Armor, Emerald
|
||||
if (CheckForStick(color.rgb)) {
|
||||
#include "/lib/materials/specificMaterials/planks/sprucePlanks.glsl"
|
||||
} else {
|
||||
#include "/lib/materials/specificMaterials/terrain/diamondBlock.glsl"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45024) { // Netherite Tools, Netherite Armor, Netherite Ingot
|
||||
materialMask = OSIEBCA; // Intense Fresnel
|
||||
smoothnessG = color.b * 1.65;
|
||||
smoothnessG = min1(smoothnessG);
|
||||
highlightMult = smoothnessG * 2.0;
|
||||
smoothnessD = smoothnessG * smoothnessG * 0.5;
|
||||
|
||||
#ifdef COATED_TEXTURES
|
||||
noiseFactor = 0.33;
|
||||
#endif
|
||||
} else /*if (currentRenderedItemId == 45028)*/ { // Trident Item
|
||||
#include "/lib/materials/specificMaterials/others/trident.glsl"
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId < 45048) {
|
||||
if (currentRenderedItemId < 45040) {
|
||||
if (currentRenderedItemId == 45032) { // Lava Bucket
|
||||
if (color.r + color.g > color.b * 2.0) {
|
||||
emission = color.r + color.g - color.b * 1.5;
|
||||
emission *= 1.8;
|
||||
color.rg += color.b * vec2(0.4, 0.15);
|
||||
color.b *= 0.8;
|
||||
if (LAVA_TEMPERATURE != 0.0) maRecolor += LAVA_TEMPERATURE * 0.1;
|
||||
emission *= LAVA_EMISSION;
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
} else {
|
||||
#include "/lib/materials/specificMaterials/terrain/ironBlock.glsl"
|
||||
}
|
||||
} else /*if (currentRenderedItemId == 45036)*/ { // Bucket++
|
||||
if (GetMaxColorDif(color.rgb) < 0.01) {
|
||||
#include "/lib/materials/specificMaterials/terrain/ironBlock.glsl"
|
||||
} else {
|
||||
float factor = color.b;
|
||||
smoothnessG = factor;
|
||||
highlightMult = factor * 2.0;
|
||||
smoothnessD = factor;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45040) { // Blaze Rod, Blaze Powder
|
||||
noSmoothLighting = false;
|
||||
lmCoordM.x = 0.85;
|
||||
emission = color.g;
|
||||
color.rgb = sqrt1(color.rgb);
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 2.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
} else /*if (currentRenderedItemId == 45044)*/ { // Bottle o' Enchanting, Glow Inc Sac
|
||||
emission = color.b * 2.0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId < 45056) {
|
||||
if (currentRenderedItemId == 45048) { // Fire Charge
|
||||
emission = max0(color.r + color.g - color.b * 0.5);
|
||||
#ifdef SOUL_SAND_VALLEY_OVERHAUL_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 5.0, colorSoul, inSoulValley);
|
||||
#endif
|
||||
#ifdef PURPLE_END_FIRE_INTERNAL
|
||||
color.rgb = changeColorFunction(color.rgb, 5.0, colorEndBreath, 1.0);
|
||||
#endif
|
||||
} else /*if (currentRenderedItemId == 45052)*/ { // Chorus Fruit
|
||||
emission = max0(color.b * 2.0 - color.r) * 1.5;
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45056) { // Amethyst Shard
|
||||
materialMask = OSIEBCA; // Intense Fresnel
|
||||
float factor = pow2(color.r);
|
||||
smoothnessG = 0.8 - factor * 0.3;
|
||||
highlightMult = factor * 3.0;
|
||||
smoothnessD = factor;
|
||||
} else /*if (currentRenderedItemId == 45060)*/ { // Shield
|
||||
float factor = min(color.r * color.g * color.b * 4.0, 0.7) * 0.7;
|
||||
smoothnessG = factor;
|
||||
highlightMult = factor * 3.0;
|
||||
smoothnessD = factor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId < 45096) {
|
||||
if (currentRenderedItemId < 45080) {
|
||||
if (currentRenderedItemId < 45072) {
|
||||
if (currentRenderedItemId == 45064) { // Turtle Shell
|
||||
float factor = color.g * 0.7;
|
||||
smoothnessG = factor;
|
||||
highlightMult = factor * 3.0;
|
||||
smoothnessD = factor;
|
||||
} else /*if (currentRenderedItemId == 45068)*/ { // Ender Pearl
|
||||
smoothnessG = 1.0;
|
||||
highlightMult = 2.0;
|
||||
smoothnessD = 1.0;
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45072) { // Eye of Ender
|
||||
smoothnessG = 1.0;
|
||||
highlightMult = 2.0;
|
||||
smoothnessD = 1.0;
|
||||
emission = max0(color.g - color.b * 0.25);
|
||||
color.rgb = pow(color.rgb, vec3(1.0 - 0.75 * emission));
|
||||
} else /*if (currentRenderedItemId == 45076)*/ { // Clock
|
||||
if (
|
||||
CheckForColor(color.rgb, vec3(255, 255, 0)) ||
|
||||
CheckForColor(color.rgb, vec3(204, 204, 0)) ||
|
||||
CheckForColor(color.rgb, vec3(73, 104, 216)) ||
|
||||
CheckForColor(color.rgb, vec3(58, 83, 172)) ||
|
||||
CheckForColor(color.rgb, vec3(108, 108, 137)) ||
|
||||
CheckForColor(color.rgb, vec3(86, 86, 109))
|
||||
) {
|
||||
emission = 1.0;
|
||||
color.rgb += vec3(0.1);
|
||||
}
|
||||
|
||||
#include "/lib/materials/specificMaterials/terrain/goldBlock.glsl"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId < 45088) {
|
||||
if (currentRenderedItemId == 45080) { // Compass
|
||||
if (color.r - 0.1 > color.b + color.g) {
|
||||
emission = color.r * 1.5;
|
||||
}
|
||||
|
||||
#include "/lib/materials/specificMaterials/terrain/ironBlock.glsl"
|
||||
} else /*if (currentRenderedItemId == 45084)*/ { // Echo Shard, Recovery Compass, Music Disc 5
|
||||
emission = max0(color.b + color.g - color.r * 2.0);
|
||||
|
||||
#include "/lib/materials/specificMaterials/terrain/ironBlock.glsl"
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45088) { // Nether Star
|
||||
emission = pow2(color.r + color.g) * 0.5;
|
||||
} else /*if (currentRenderedItemId == 45092)*/ { // End Crystal
|
||||
if (color.g < color.r) {
|
||||
emission = 3.0;
|
||||
color.r *= 1.1;
|
||||
}
|
||||
emission *= END_CRYSTAL_EMISSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId < 45112) {
|
||||
if (currentRenderedItemId < 45104) {
|
||||
if (currentRenderedItemId == 45096) { // Glow Berries
|
||||
// iris needs to add support
|
||||
} else /*if (currentRenderedItemId == 45100)*/ { // Glowstone Dust
|
||||
emission = dot(color.rgb, color.rgb) * 0.5 + 1.0;
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45104) { // Prismarine Crystals
|
||||
emission = pow1_5(color.r) * 2.5 + 0.2;
|
||||
} else /*if (currentRenderedItemId == 45108)*/ { // Totem of Undying
|
||||
#include "/lib/materials/specificMaterials/terrain/goldBlock.glsl"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId < 45120) {
|
||||
if (currentRenderedItemId == 45112) { // Trial Key, Ominous Trial Key
|
||||
emission = abs(color.r - color.b) * 3.0;
|
||||
color.rgb = pow(color.rgb, vec3(1.0 + 0.5 * sqrt(emission)));
|
||||
} else /*if (currentRenderedItemId == 45116)*/ { // Copper Tools, Copper Armor, Copper Ingot, Copper Horse Armor
|
||||
#include "/lib/materials/specificMaterials/terrain/copperBlock.glsl"
|
||||
|
||||
smoothnessD *= 0.5;
|
||||
}
|
||||
} else {
|
||||
if (currentRenderedItemId == 45120) { // Ghast Harness+
|
||||
vec2 tSize = textureSize(tex, 0);
|
||||
vec4 checkColorOneDown = texelFetch(tex, ivec2(texCoord * tSize) + ivec2(0, 1), 0);
|
||||
if (
|
||||
CheckForColor(color.rgb, vec3(139, 193, 205)) ||
|
||||
CheckForColor(color.rgb, vec3(208, 234, 233)) ||
|
||||
CheckForColor(color.rgb, vec3(109, 152, 161)) ||
|
||||
CheckForColor(color.rgb, vec3(255)) && CheckForColor(checkColorOneDown.rgb, vec3(109, 152, 161)) ||
|
||||
CheckForColor(color.rgb, vec3(168, 208, 217))
|
||||
) {
|
||||
smoothnessG = 1.0;
|
||||
highlightMult = 2.0 - dot(color.rgb, vec3(0.25));
|
||||
smoothnessD = 1.0;
|
||||
}
|
||||
} else /*if (currentRenderedItemId == 45124)*/ { //
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#if !(defined DH_TERRAIN || defined DH_WATER)
|
||||
#define BLOCK_LAVA_DEFINE mat == 10068 || mat == 10070
|
||||
#define BLOCK_LAVA_STILL_DEFINE mat == 10068
|
||||
#define BLOCK_LEAVES_SEASONS_DEFINE mat == 10009 || mat == 10011
|
||||
#else
|
||||
#define BLOCK_LAVA_DEFINE mat == DH_BLOCK_LAVA
|
||||
#define BLOCK_LAVA_STILL_DEFINE mat == DH_BLOCK_LAVA
|
||||
#define BLOCK_LEAVES_SEASONS_DEFINE mat == DH_BLOCK_LEAVES
|
||||
#endif
|
||||
+3645
File diff suppressed because it is too large
Load Diff
+190
@@ -0,0 +1,190 @@
|
||||
#include "/lib/shaderSettings/water.glsl"
|
||||
if (mat < 32008) {
|
||||
if (mat < 30016) {
|
||||
if (mat < 30008) {
|
||||
if (mat == 30000) { //
|
||||
|
||||
} else if (mat == 30004) { //
|
||||
|
||||
}
|
||||
} else {
|
||||
if (mat == 30008) { // Tinted Glass
|
||||
#ifdef CONNECTED_GLASS_EFFECT
|
||||
uint voxelID = uint(254);
|
||||
bool isPane = false;
|
||||
DoConnectedGlass(colorP, color, noGeneratedNormals, playerPos, worldGeoNormal, voxelID, isPane);
|
||||
#endif
|
||||
color.a = pow(color.a, 1.0 - fresnelM);
|
||||
reflectMult = 1.0;
|
||||
|
||||
#ifndef MIRROR_TINTED_GLASS
|
||||
DoTranslucentTweaks(color, fresnelM, reflectMult, lViewPos);
|
||||
#else
|
||||
color.a = color.a * 0.3 + 0.7;
|
||||
fresnelM = fresnelM * 0.5 + 0.5;
|
||||
reflectMult /= color.a;
|
||||
noGeneratedNormals = true;
|
||||
#ifdef MIRROR_TINTED_GLASS_OPAQUE
|
||||
color.a = 1.0;
|
||||
#endif
|
||||
#endif
|
||||
overlayNoiseAlpha = 0.95;
|
||||
sandNoiseIntensity = 0.5;
|
||||
mossNoiseIntensity = 0.5;
|
||||
} else /*if (mat == 30012)*/ { // Slime Block
|
||||
translucentMultCalculated = true;
|
||||
reflectMult = 0.7;
|
||||
translucentMult.rgb = pow2(color.rgb) * 0.2;
|
||||
|
||||
smoothnessG = color.g * 0.7;
|
||||
highlightMult = 2.5;
|
||||
overlayNoiseAlpha = 0.6;
|
||||
sandNoiseIntensity = 0.5;
|
||||
mossNoiseIntensity = 0.5;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mat < 32000) {
|
||||
if (mat < 31000) {
|
||||
if (mat == 30016) { // Honey Block
|
||||
translucentMultCalculated = true;
|
||||
reflectMult = 1.0;
|
||||
translucentMult.rgb = pow2(color.rgb) * 0.2;
|
||||
|
||||
smoothnessG = color.r * 0.7;
|
||||
highlightMult = 2.5;
|
||||
overlayNoiseAlpha = 0.4;
|
||||
sandNoiseIntensity = 0.5;
|
||||
mossNoiseIntensity = 0.5;
|
||||
} else /*if (mat == 30020)*/ { // Nether Portal
|
||||
#ifdef SPECIAL_PORTAL_EFFECTS
|
||||
#include "/lib/materials/specificMaterials/translucents/netherPortal.glsl"
|
||||
#endif
|
||||
overlayNoiseIntensity = 0.0;
|
||||
}
|
||||
} else { // (31XXX)
|
||||
if (mat % 2 == 0) { // Stained Glass
|
||||
#ifdef CONNECTED_GLASS_EFFECT
|
||||
uint voxelID = uint(200 + (mat - 31000) / 2);
|
||||
bool isPane = false;
|
||||
DoConnectedGlass(colorP, color, noGeneratedNormals, playerPos, worldGeoNormal, voxelID, isPane);
|
||||
#endif
|
||||
#include "/lib/materials/specificMaterials/translucents/stainedGlass.glsl"
|
||||
overlayNoiseAlpha = 1.05;
|
||||
mossNoiseIntensity = 0.8;
|
||||
} else /*if (mat % 2 == 1)*/ { // Stained Glass Pane
|
||||
#ifdef CONNECTED_GLASS_EFFECT
|
||||
uint voxelID = uint(200 + (mat - 31000) / 2);
|
||||
bool isPane = true;
|
||||
DoConnectedGlass(colorP, color, noGeneratedNormals, playerPos, worldGeoNormal, voxelID, isPane);
|
||||
#endif
|
||||
#include "/lib/materials/specificMaterials/translucents/stainedGlass.glsl"
|
||||
noSmoothLighting = true;
|
||||
overlayNoiseAlpha = 1.05;
|
||||
sandNoiseIntensity = 0.8;
|
||||
mossNoiseIntensity = 0.8;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mat == 32000) { // Water
|
||||
#ifdef SHADER_WATER
|
||||
#include "/lib/materials/specificMaterials/translucents/water.glsl"
|
||||
#endif
|
||||
overlayNoiseIntensity = 0.0;
|
||||
overlayNoiseFresnelMult = 0.0;
|
||||
IPBRMult = 0.0;
|
||||
overlayNoiseAlpha = 0.0;
|
||||
} else /*if (mat == 32004)*/ { // Ice
|
||||
smoothnessG = pow2(color.g) * color.g;
|
||||
highlightMult = pow2(min1(pow2(color.g) * 1.5)) * 3.5;
|
||||
|
||||
reflectMult = 0.7;
|
||||
overlayNoiseAlpha = 0.6;
|
||||
sandNoiseIntensity = 0.7;
|
||||
mossNoiseIntensity = 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mat < 32024) {
|
||||
if (mat < 32016) {
|
||||
if (mat < 32012) { // Glass
|
||||
if (mat == 32008){
|
||||
#ifdef CONNECTED_GLASS_EFFECT
|
||||
uint voxelID = uint(217);
|
||||
bool isPane = false;
|
||||
DoConnectedGlass(colorP, color, noGeneratedNormals, playerPos, worldGeoNormal, voxelID, isPane);
|
||||
#endif
|
||||
}
|
||||
#include "/lib/materials/specificMaterials/translucents/glass.glsl"
|
||||
overlayNoiseAlpha = 0.8;
|
||||
sandNoiseIntensity = 0.8;
|
||||
mossNoiseIntensity = 0.8;
|
||||
} else /*if (mat == 32012)*/ { // Glass Pane
|
||||
if (mat == 32012) {
|
||||
#ifdef CONNECTED_GLASS_EFFECT
|
||||
uint voxelID = uint(218);
|
||||
bool isPane = true;
|
||||
DoConnectedGlass(colorP, color, noGeneratedNormals, playerPos, worldGeoNormal, voxelID, isPane);
|
||||
#endif
|
||||
}
|
||||
if (color.a < 0.001 && abs(NdotU) > 0.95) discard; // Fixing artifacts on CTM/Opti connected glass panes
|
||||
#include "/lib/materials/specificMaterials/translucents/glass.glsl"
|
||||
noSmoothLighting = true;
|
||||
overlayNoiseAlpha = 0.8;
|
||||
sandNoiseIntensity = 0.8;
|
||||
mossNoiseIntensity = 0.8;
|
||||
}
|
||||
} else {
|
||||
if (mat == 32016) { // Beacon
|
||||
lmCoordM.x = 0.88;
|
||||
|
||||
translucentMultCalculated = true;
|
||||
translucentMult = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
if (color.b > 0.5) {
|
||||
if (color.g - color.b < 0.01 && color.g < 0.99) {
|
||||
#include "/lib/materials/specificMaterials/translucents/glass.glsl"
|
||||
} else { // Beacon:Center
|
||||
lmCoordM = vec2(0.0);
|
||||
noDirectionalShading = true;
|
||||
|
||||
float lColor = length(color.rgb);
|
||||
vec3 baseColor = vec3(0.1, 1.0, 0.92);
|
||||
if (lColor > 1.65) color.rgb = baseColor + 0.2;
|
||||
else if (lColor > 1.5) color.rgb = baseColor + 0.15;
|
||||
else if (lColor > 1.3) color.rgb = baseColor + 0.08;
|
||||
else if (lColor > 1.15) color.rgb = baseColor + 0.035;
|
||||
else color.rgb = baseColor;
|
||||
emission = 3.5;
|
||||
}
|
||||
} else { // Beacon:Obsidian
|
||||
float factor = color.r * 1.5;
|
||||
|
||||
smoothnessG = factor;
|
||||
highlightMult = 2.0 + min1(smoothnessG * 2.0) * 1.5;
|
||||
smoothnessG = min1(smoothnessG);
|
||||
}
|
||||
overlayNoiseAlpha = 0.8;
|
||||
sandNoiseIntensity = 0.5;
|
||||
mossNoiseIntensity = 0.5;
|
||||
} else /*if (mat == 32020)*/ { //
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mat < 32032) {
|
||||
if (mat == 32024) { //
|
||||
|
||||
} else /*if (mat == 32028)*/ { //
|
||||
|
||||
}
|
||||
} else {
|
||||
if (mat == 32032) { //
|
||||
|
||||
} else /*if (mat == 32036)*/ { //
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user