diff --git a/assets/minecraft/models/item/props/vending_mashine.json b/assets/minecraft/models/item/props/vending_machine.json similarity index 99% rename from assets/minecraft/models/item/props/vending_mashine.json rename to assets/minecraft/models/item/props/vending_machine.json index 13566ee..bcd9c6c 100644 --- a/assets/minecraft/models/item/props/vending_mashine.json +++ b/assets/minecraft/models/item/props/vending_machine.json @@ -2,8 +2,8 @@ "credit": "Made with Blockbench", "texture_size": [64, 64], "textures": { - "0": "item/props/vending_mashine", - "particle": "item/props/vending_mashine" + "0": "item/props/vending_machine", + "particle": "item/props/vending_machine" }, "elements": [ { diff --git a/assets/minecraft/shaders/core/particle.fsh b/assets/minecraft/shaders/core/particle.fsh new file mode 100644 index 0000000..e0cb0a8 --- /dev/null +++ b/assets/minecraft/shaders/core/particle.fsh @@ -0,0 +1,29 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec2 texCoord0; +in vec4 vertexColor; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; + if (color.a < 0.1) { + discard; + } + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.fsh b/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.fsh new file mode 100644 index 0000000..ab5f1da --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_armor_cutout_no_cull.fsh @@ -0,0 +1,31 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec2 texCoord0; +in vec2 texCoord1; +in vec4 normal; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; + if (color.a < 0.1) { + discard; + } + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_cutout.fsh b/assets/minecraft/shaders/core/rendertype_cutout.fsh new file mode 100644 index 0000000..860c01e --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_cutout.fsh @@ -0,0 +1,29 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; + if (color.a < 0.1) { + discard; + } + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout.fsh b/assets/minecraft/shaders/core/rendertype_entity_cutout.fsh new file mode 100644 index 0000000..b4407eb --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_entity_cutout.fsh @@ -0,0 +1,34 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec4 lightMapColor; +in vec4 overlayColor; +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0); + if (color.a < 0.1) { + discard; + } + color *= vertexColor * ColorModulator; + color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); + color *= lightMapColor; + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.fsh b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.fsh new file mode 100644 index 0000000..d7e5d51 --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_entity_cutout_no_cull.fsh @@ -0,0 +1,35 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec4 lightMapColor; +in vec4 overlayColor; +in vec2 texCoord0; +in vec4 normal; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0); + if (color.a < 0.1) { + discard; + } + color *= vertexColor * ColorModulator; + color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); + color *= lightMapColor; + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_entity_decal.fsh b/assets/minecraft/shaders/core/rendertype_entity_decal.fsh new file mode 100644 index 0000000..7d35c81 --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_entity_decal.fsh @@ -0,0 +1,32 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec4 overlayColor; +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0); + if (color.a < 0.1) { + discard; + } + color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); + color *= vertexColor * ColorModulator; + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_entity_translucent_cull.fsh b/assets/minecraft/shaders/core/rendertype_entity_translucent_cull.fsh new file mode 100644 index 0000000..ab5f1da --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_entity_translucent_cull.fsh @@ -0,0 +1,31 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec2 texCoord0; +in vec2 texCoord1; +in vec4 normal; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; + if (color.a < 0.1) { + discard; + } + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.fsh b/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.fsh new file mode 100644 index 0000000..2500475 --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_item_entity_translucent_cull.fsh @@ -0,0 +1,30 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec2 texCoord0; +in vec2 texCoord1; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; + if (color.a < 0.1) { + discard; + } + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_solid.fsh b/assets/minecraft/shaders/core/rendertype_solid.fsh new file mode 100644 index 0000000..e8febdb --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_solid.fsh @@ -0,0 +1,27 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec2 texCoord0; +in vec4 normal; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_translucent.fsh b/assets/minecraft/shaders/core/rendertype_translucent.fsh new file mode 100644 index 0000000..ffaa987 --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_translucent.fsh @@ -0,0 +1,26 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/assets/minecraft/shaders/core/rendertype_translucent_moving_block.fsh b/assets/minecraft/shaders/core/rendertype_translucent_moving_block.fsh new file mode 100644 index 0000000..bec699c --- /dev/null +++ b/assets/minecraft/shaders/core/rendertype_translucent_moving_block.fsh @@ -0,0 +1,21 @@ +#version 150 + +uniform sampler2D Sampler0; +uniform sampler2D Sampler2; + +uniform vec4 ColorModulator; + +in vec4 vertexColor; +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor; + fragColor = color * ColorModulator; + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = texture(Sampler0, texCoord0) * ColorModulator; + } +} diff --git a/assets/minecraft/textures/item/props/vending_mashine.png b/assets/minecraft/textures/item/props/vending_machine.png similarity index 100% rename from assets/minecraft/textures/item/props/vending_mashine.png rename to assets/minecraft/textures/item/props/vending_machine.png diff --git a/pack.mcmeta b/pack.mcmeta index b52f044..37cc1e3 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -2,5 +2,20 @@ "pack": { "pack_format": 42, "description": "§b§lHytale Thankmas §f§l2024§7 •\n§3Server Resource Pack ⛏" - } + }, +"overlays": { + "entries": [ + { + "formats": {"min_inclusive": 36, "max_inclusive": 2147483647}, + "directory": "shaders_v36" + } + ] + }, + "sodium": { + "ignored_shaders": [ + "rendertype_solid.fsh", + "rendertype_cutout.fsh", + "rendertype_translucent.fsh" + ] + } } \ No newline at end of file diff --git a/shaders_v36/assets/minecraft/shaders/core/entity.fsh b/shaders_v36/assets/minecraft/shaders/core/entity.fsh new file mode 100644 index 0000000..a9851fd --- /dev/null +++ b/shaders_v36/assets/minecraft/shaders/core/entity.fsh @@ -0,0 +1,40 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec4 lightMapColor; +in vec4 overlayColor; +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0); +#ifdef ALPHA_CUTOUT + if (color.a < ALPHA_CUTOUT) { + discard; + } +#endif + color *= vertexColor * ColorModulator; +#ifndef NO_OVERLAY + color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a); +#endif +#ifndef EMISSIVE + color *= lightMapColor; +#endif + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +} diff --git a/shaders_v36/assets/minecraft/shaders/core/terrain.fsh b/shaders_v36/assets/minecraft/shaders/core/terrain.fsh new file mode 100644 index 0000000..f121051 --- /dev/null +++ b/shaders_v36/assets/minecraft/shaders/core/terrain.fsh @@ -0,0 +1,31 @@ +#version 150 + +#moj_import + +uniform sampler2D Sampler0; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; + +in float vertexDistance; +in vec4 vertexColor; +in vec2 texCoord0; + +out vec4 fragColor; + +void main() { + vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; +#ifdef ALPHA_CUTOUT + if (color.a < ALPHA_CUTOUT) { + discard; + } +#endif + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); + + // Emissive + if (color.a > 0.996 && color.a < 0.997) { + fragColor = linear_fog(texture(Sampler0, texCoord0), vertexDistance, FogStart, FogEnd, FogColor); + } +}