2.1.1: 2024 Jan. 20 (GHOST PATCH: Jan. 24)
|
@ -1,9 +1,7 @@
|
|||
{
|
||||
"vertex": "core/render/gui",
|
||||
"fragment": "core/position_color",
|
||||
"samplers": [
|
||||
{ "name": "Sampler0" }
|
||||
],
|
||||
"fragment": "core/render/gui",
|
||||
"samplers": [],
|
||||
"uniforms": [
|
||||
{
|
||||
"name": "ModelViewMat",
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{"providers":[{"type":"reference","id":"space"},{"type":"space","advances":{"":-1025}},{"type":"bitmap","file":"font/screen/flash.png","ascent":1024,"height":2048,"chars":[""]},{"type":"bitmap","file":"font/screen/trans.png","ascent":1024,"height":2048,"chars":[""]},{"type":"bitmap","file":"font/screen/death.png","ascent":24,"height":64,"chars":[""]},{"type":"bitmap","file":"font/screen/warp.png","ascent":24,"height":64,"chars":[""]},{"type":"bitmap","file":"font/screen/wynncraft.png","ascent":48,"height":64,"chars":["","\u0000\u0000"]},{"type":"bitmap","file":"font/screen/load.png","ascent":16,"height":32,"chars":[""]}]}
|
1
assets/minecraft/font/screen/static.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"providers":[{"type":"reference","id":"space"},{"type":"space","advances":{"":-1025}},{"type":"bitmap","file":"font/screen/static/flash.png","ascent":1024,"height":2048,"chars":[""]},{"type":"bitmap","file":"font/screen/static/trans.png","ascent":1024,"height":2048,"chars":[""]},{"type":"bitmap","file":"font/screen/static/death.png","ascent":24,"height":64,"chars":[""]},{"type":"bitmap","file":"font/screen/static/warp.png","ascent":24,"height":64,"chars":[""]},{"type":"bitmap","file":"font/screen/static/wynncraft.png","ascent":48,"height":64,"chars":["","\u0000\u0000"]},{"type":"bitmap","file":"font/screen/static/load.png","ascent":16,"height":32,"chars":[""]}]}
|
1
assets/minecraft/font/screen/transition.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"providers":[{"type":"reference","id":"space"},{"type":"bitmap","file":"font/screen/transition/marker.png","ascent":-1024,"height":1,"chars":["",""]}]}
|
1
assets/minecraft/items/petrified_oak_slab.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"model":{"type":"minecraft:model","model":"minecraft:block/variants/dark_cobblestone_half_slab"}}
|
|
@ -1 +1 @@
|
|||
{"model":{"type":"minecraft:model","model":"minecraft:item/snow"}}
|
||||
{"model":{"type":"minecraft:empty"}}
|
|
@ -1 +0,0 @@
|
|||
{"parent":"item/generated","textures":{"layer0":"block/grass"}}
|
|
@ -1 +1 @@
|
|||
{"parent":"builtin/generated","textures":{"layer0":"wynn/missingno"},"display":{"thirdperson_righthand":{"rotation":[-90,0,0],"translation":[0,1,-3],"scale":[0.55,0.55,0.55]},"thirdperson_lefthand":{"rotation":[-90,0,0],"translation":[0,1,-3],"scale":[0.55,0.55,0.55]},"firstperson_righthand":{"rotation":[0,-135,25],"translation":[0,4,2],"scale":[1.7,1.7,1.7]},"firstperson_lefthand":{"rotation":[0,-135,25],"translation":[0,4,2],"scale":[1.7,1.7,1.7]}}}
|
||||
{"parent":"builtin/generated","textures":{"layer0":"wynn/missingno"}}
|
|
@ -1 +1 @@
|
|||
{"textures":{"0":"wynn/jigsaw/bonny/flame","2":"wynn/jigsaw/bonny/eyes","particle":"wynn/jigsaw/bonny/flame"},"elements":[{"from":[5,4,5],"to":[11,20,11],"rotation":{"angle":0,"axis":"y","origin":[8,8,8]},"faces":{"north":{"uv":[5,0,11,16],"texture":"#0"},"east":{"uv":[11,0,5,16],"texture":"#0"},"south":{"uv":[5,0,11,16],"texture":"#0"},"west":{"uv":[11,0,5,16],"texture":"#0"},"down":{"uv":[5,10,11,16],"texture":"#0"}}},{"from":[11,4,5],"to":[5,20,11],"rotation":{"angle":0,"axis":"y","origin":[8,8,8]},"faces":{"north":{"uv":[11,0,5,16],"texture":"#0"},"east":{"uv":[5,0,11,16],"texture":"#0"},"south":{"uv":[11,0,5,16],"texture":"#0"},"west":{"uv":[5,0,11,16],"texture":"#0"},"down":{"uv":[5,10,11,16],"texture":"#0"}}},{"from":[3.5,2.5,4.5],"to":[12.5,9.5,11.5],"rotation":{"angle":0,"axis":"y","origin":[8,3.5,8]},"faces":{"north":{"uv":[4,5,12,11],"texture":"#2"},"east":{"uv":[0,0,0,0],"texture":"#2"},"south":{"uv":[0,0,0,0],"texture":"#2"},"west":{"uv":[0,0,0,0],"texture":"#2"},"up":{"uv":[0,0,0,0],"texture":"#2"},"down":{"uv":[0,0,0,0],"texture":"#2"}}}],"display":{"head":{"scale":[1.65,1.65,1.65]}}}
|
||||
{"textures":{"0":"wynn/jigsaw/bonny/flame","1":"wynn/jigsaw/bonny/eyes","particle":"wynn/jigsaw/bonny/flame"},"elements":[{"from":[5,4,5],"to":[11,20,11],"rotation":{"angle":0,"axis":"y","origin":[8,8,8]},"faces":{"north":{"uv":[5,0,11,16],"texture":"#0"},"east":{"uv":[11,0,5,16],"texture":"#0"},"south":{"uv":[5,0,11,16],"texture":"#0"},"west":{"uv":[11,0,5,16],"texture":"#0"},"down":{"uv":[5,10,11,16],"texture":"#0"}}},{"from":[11,4,5],"to":[5,20,11],"rotation":{"angle":0,"axis":"y","origin":[8,8,8]},"faces":{"north":{"uv":[11,0,5,16],"texture":"#0"},"east":{"uv":[5,0,11,16],"texture":"#0"},"south":{"uv":[11,0,5,16],"texture":"#0"},"west":{"uv":[5,0,11,16],"texture":"#0"},"down":{"uv":[5,10,11,16],"texture":"#0"}}},{"from":[3.5,2.5,4.5],"to":[12.5,9.5,11.5],"rotation":{"angle":0,"axis":"y","origin":[8,3.5,8]},"faces":{"north":{"uv":[4,5,12,11],"texture":"#1"}}}],"display":{"head":{"scale":[1.65,1.65,1.65]}}}
|
|
@ -1 +1 @@
|
|||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/gui","fragment":"position_color","attributes":["Color"],"samplers":[],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]}]}
|
||||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/gui","fragment":"render/gui","samplers":[],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]}]}
|
|
@ -1 +1 @@
|
|||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/texture","fragment":"render/texture","attributes":["Position","UV0"],"samplers":[{"name":"Sampler0"}],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]},{"name":"ScreenSize","type":"float","count":2,"values":[0.0,0.0]},{"name":"GameTime","type":"float","count":1,"values":[1.0]}]}
|
||||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/texture","fragment":"render/texture","samplers":[{"name":"Sampler0"}],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]},{"name":"ScreenSize","type":"float","count":2,"values":[0.0,0.0]},{"name":"GameTime","type":"float","count":1,"values":[1.0]}]}
|
|
@ -19,11 +19,10 @@ void main() {
|
|||
transform.color = Color;
|
||||
transform.position = Position;
|
||||
transform.projMat = ProjMat;
|
||||
transform.vertexColor = Color;
|
||||
|
||||
gl_Position = ProjMat * ModelViewMat * vec4(transform.position, 1.0);
|
||||
|
||||
disableBadges(2);
|
||||
disableTooltips();
|
||||
vertexColor = transform.vertexColor;
|
||||
vertexColor = transform.color;
|
||||
}
|
|
@ -6,6 +6,7 @@
|
|||
#moj_import <fog.glsl>
|
||||
#moj_import <util.glsl>
|
||||
#moj_import <item.glsl>
|
||||
#moj_import <effect.glsl>
|
||||
#moj_import <version.glsl>
|
||||
|
||||
in vec3 Position;
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
#define RENDERTYPE_TEXT_SEE_THROUGH
|
||||
|
||||
#moj_import <fog.glsl>
|
||||
#moj_import <matrix.glsl>
|
||||
#moj_import <util.glsl>
|
||||
#moj_import <text.glsl>
|
||||
#moj_import <effect.glsl>
|
||||
#moj_import <transition.glsl>
|
||||
#moj_import <version.glsl>
|
||||
|
||||
uniform sampler2D Sampler0;
|
||||
|
@ -13,6 +17,8 @@ uniform vec4 ColorModulator;
|
|||
uniform float FogStart;
|
||||
uniform float FogEnd;
|
||||
uniform vec4 FogColor;
|
||||
uniform float GameTime;
|
||||
uniform vec2 ScreenSize;
|
||||
|
||||
in float vertexDistance;
|
||||
in vec4 vertexColor;
|
||||
|
@ -21,16 +27,33 @@ in vec2 texCoord0;
|
|||
in float depth;
|
||||
in float shadow;
|
||||
|
||||
flat in int transition;
|
||||
flat in int vertexId;
|
||||
in vec2 topRight;
|
||||
in vec2 bottomLeft;
|
||||
in vec2 screen;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
void main() {
|
||||
transform.vertexColor = vertexColor;
|
||||
transform.colorMod = ColorModulator;
|
||||
transform.texColor = texture(Sampler0, texCoord0);
|
||||
transform.color = transform.texColor * vertexColor * ColorModulator;
|
||||
transform.color = transform.texColor * transform.vertexColor * transform.colorMod;
|
||||
transform.gameTime = GameTime;
|
||||
transform.screenSize = ScreenSize;
|
||||
transform.centerUV = gl_FragCoord.xy / transform.screenSize - 0.5;
|
||||
transform.aspectRatio = transform.screenSize.y / transform.screenSize.x;
|
||||
transform.textDepth = depth;
|
||||
transform.isShadow = shadow > 0.5;
|
||||
|
||||
transform.transition = transition;
|
||||
transform.vertexId = vertexId;
|
||||
transform.topRight = topRight;
|
||||
transform.bottomLeft = bottomLeft;
|
||||
transform.screen = screen;
|
||||
|
||||
applyTransitions();
|
||||
disableShadow(2200);
|
||||
|
||||
#if defined(MC_1_21_2)
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#moj_import <fog.glsl>
|
||||
#moj_import <util.glsl>
|
||||
#moj_import <text.glsl>
|
||||
#moj_import <effect.glsl>
|
||||
#moj_import <transition.glsl>
|
||||
#moj_import <version.glsl>
|
||||
|
||||
in vec3 Position;
|
||||
|
@ -29,6 +31,12 @@ out vec2 texCoord0;
|
|||
out float depth;
|
||||
out float shadow;
|
||||
|
||||
flat out int transition;
|
||||
flat out int vertexId;
|
||||
out vec2 topRight;
|
||||
out vec2 bottomLeft;
|
||||
out vec2 screen;
|
||||
|
||||
vec4 fetchAtlas(ivec2 coords) {
|
||||
return texelFetch(Sampler0, coords, 0) * 255.0;
|
||||
}
|
||||
|
@ -37,6 +45,7 @@ void main() {
|
|||
transform.color = Color;
|
||||
transform.textureColor = getVertexColor(Sampler0, gl_VertexID, UV0) * 255;
|
||||
transform.textureUV = UV0;
|
||||
transform.texture = round(texture(Sampler0, transform.textureUV) * 255);
|
||||
transform.screenSize = ScreenSize;
|
||||
transform.position = Position;
|
||||
transform.screenOffset = vec4(0);
|
||||
|
@ -44,6 +53,16 @@ void main() {
|
|||
transform.gameTime = GameTime;
|
||||
transform.textDepth = Position.z;
|
||||
|
||||
topRight = bottomLeft = vec2(0);
|
||||
vertexId = gl_VertexID % 4;
|
||||
transform.screen = corners[vertexId];
|
||||
|
||||
if(vertexId == 0)
|
||||
topRight = transform.textureUV * 256;
|
||||
if(vertexId == 2)
|
||||
bottomLeft = transform.textureUV * 256;
|
||||
transform.transition = 0;
|
||||
|
||||
shadow = fract(transform.position.z) < 0.01 ? 1.0 : 0.0;
|
||||
transform.isShadow = shadow > 0.5;
|
||||
|
||||
|
@ -61,6 +80,11 @@ void main() {
|
|||
screenAnchor(fetchAtlas(ivec2(6, 8)), 47, vec2(0, 0), 4);
|
||||
offset(3, vec2(0, 0), vec2(0, 1), true);
|
||||
|
||||
gl_Position = (ProjMat * ModelViewMat * vec4(transform.position, 1.0)) + transform.screenOffset;
|
||||
|
||||
initTransitions();
|
||||
transition = transform.transition;
|
||||
screen = transform.screen;
|
||||
depth = Position.z;
|
||||
texCoord0 = transform.textureUV;
|
||||
vertexDistance = fog_distance(transform.position, FogShape);
|
||||
|
@ -77,5 +101,4 @@ void main() {
|
|||
vertexColor = transform.color;
|
||||
#endif
|
||||
|
||||
gl_Position = (ProjMat * ModelViewMat * vec4(transform.position, 1.0)) + transform.screenOffset;
|
||||
}
|
|
@ -1 +1 @@
|
|||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/item","fragment":"render/item","attributes":["Position","Color","UV0","UV1","UV2","Normal"],"samplers":[{"name":"Sampler0"},{"name":"Sampler2"}],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]},{"name":"Light0_Direction","type":"float","count":3,"values":[0.0,0.0,0.0]},{"name":"Light1_Direction","type":"float","count":3,"values":[0.0,0.0,0.0]},{"name":"FogStart","type":"float","count":1,"values":[0.0]},{"name":"FogEnd","type":"float","count":1,"values":[1.0]},{"name":"FogColor","type":"float","count":4,"values":[0.0,0.0,0.0,0.0]},{"name":"FogShape","type":"int","count":1,"values":[0]},{"name":"GameTime","type":"float","count":1,"values":[1.0]}]}
|
||||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/item","fragment":"render/item","samplers":[{"name":"Sampler0"},{"name":"Sampler2"}],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]},{"name":"Light0_Direction","type":"float","count":3,"values":[0.0,0.0,0.0]},{"name":"Light1_Direction","type":"float","count":3,"values":[0.0,0.0,0.0]},{"name":"FogStart","type":"float","count":1,"values":[0.0]},{"name":"FogEnd","type":"float","count":1,"values":[1.0]},{"name":"FogColor","type":"float","count":4,"values":[0.0,0.0,0.0,0.0]},{"name":"FogShape","type":"int","count":1,"values":[0]},{"name":"GameTime","type":"float","count":1,"values":[1.0]}]}
|
|
@ -1 +1 @@
|
|||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/gui","fragment":"render/gui","attributes":["Color"],"samplers":[],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]}]}
|
||||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/gui","fragment":"render/gui","samplers":[],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]}]}
|
|
@ -1 +1 @@
|
|||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/text","fragment":"render/text","attributes":["Position","Color","UV0","UV2"],"samplers":[{"name":"Sampler0"},{"name":"Sampler2"}],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]},{"name":"FogStart","type":"float","count":1,"values":[0.0]},{"name":"FogEnd","type":"float","count":1,"values":[1.0]},{"name":"FogColor","type":"float","count":4,"values":[0.0,0.0,0.0,0.0]},{"name":"ScreenSize","type":"float","count":2,"values":[1.0,1.0]},{"name":"GameTime","type":"float","count":1,"values":[1.0]}]}
|
||||
{"blend":{"func":"add","srcrgb":"srcalpha","dstrgb":"1-srcalpha"},"vertex":"render/text","fragment":"render/text","samplers":[{"name":"Sampler0"},{"name":"Sampler2"}],"uniforms":[{"name":"ModelViewMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ProjMat","type":"matrix4x4","count":16,"values":[1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0]},{"name":"ColorModulator","type":"float","count":4,"values":[1.0,1.0,1.0,1.0]},{"name":"FogStart","type":"float","count":1,"values":[0.0]},{"name":"FogEnd","type":"float","count":1,"values":[1.0]},{"name":"FogColor","type":"float","count":4,"values":[0.0,0.0,0.0,0.0]},{"name":"ScreenSize","type":"float","count":2,"values":[1.0,1.0]},{"name":"GameTime","type":"float","count":1,"values":[1.0]}]}
|
|
@ -4,4 +4,14 @@ EFFECT(0, 240, 0) {
|
|||
|
||||
EFFECT(0, 240, 4) {
|
||||
effectGradient(rgb(245, 98, 23), rgb(11, 72, 107));
|
||||
}
|
||||
|
||||
EFFECT(0, 240, 8) {
|
||||
effectFade(1.0);
|
||||
overrideColor(rgb(90, 240, 130));
|
||||
}
|
||||
|
||||
EFFECT(0, 240, 12) {
|
||||
effectBlink(1.0);
|
||||
overrideColor(rgb(230, 50, 50));
|
||||
}
|
|
@ -16,7 +16,6 @@ void overrideShadow(float factor) {
|
|||
void overrideColor(vec3 color) {
|
||||
transform.color.rgb = color;
|
||||
overrideShadow(0.25);
|
||||
//overrideColor(rgb(255, 255, 255));
|
||||
}
|
||||
|
||||
void effectRainbow() {
|
||||
|
@ -33,10 +32,20 @@ void effectGradient(vec3 color1, vec3 color2) {
|
|||
}
|
||||
|
||||
void effectPulse(vec3 color1, vec3 color2) {
|
||||
transform.color.rgb = mix(color1, color2, sin(transform.gameTime * 600.0 * TAU) * 0.5 + 0.5);
|
||||
transform.color.rgb = mix(color1, color2, sin(transform.gameTime * 800.0 * TAU) * 0.5 + 0.5);
|
||||
overrideShadow(0.25);
|
||||
}
|
||||
|
||||
void effectFade(float speed) {
|
||||
transform.color.a = mix(transform.color.a, 0.0, sin(transform.gameTime * 1200 * speed * PI) * 0.5 + 0.5);
|
||||
}
|
||||
|
||||
void effectBlink(float speed) {
|
||||
if(sin(transform.gameTime * 6400 * speed * PI) < 0.0) {
|
||||
transform.color.a = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
void applyEffects() {
|
||||
uint vertexColorId = colorId(floor(round(transform.color.rgb * 255.0) / 4.0) / 255.0);
|
||||
#ifdef RENDERTYPE_TEXT
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
struct Transform {
|
||||
vec4 color;
|
||||
vec4 vertexColor;
|
||||
vec3 position;
|
||||
mat4 projMat;
|
||||
} transform;
|
||||
|
@ -19,7 +18,7 @@ void disableBadges(float x) {
|
|||
case 0xE84F58:
|
||||
case 0xEAC864:
|
||||
case 0xCFCFCF:
|
||||
transform.vertexColor = vec4(0);
|
||||
transform.color = vec4(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +26,7 @@ void disableBadges(float x) {
|
|||
|
||||
void disableTooltips() {
|
||||
if (isTooltip(transform.projMat, transform.position) && (gl_Position.x > 1 || gl_Position.x < -0.99)) {
|
||||
transform.vertexColor = vec4(0);
|
||||
transform.color = vec4(0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -9,8 +9,6 @@ struct Transform {
|
|||
float gameTime;
|
||||
} transform;
|
||||
|
||||
#moj_import <effect.glsl>
|
||||
|
||||
void anchorZ(float depth, float target) {
|
||||
if(transform.position.z != depth) {
|
||||
return;
|
||||
|
|
|
@ -7,17 +7,18 @@ struct Transform {
|
|||
vec4 color;
|
||||
vec4 textureColor;
|
||||
vec2 textureUV;
|
||||
vec4 texture;
|
||||
vec2 screenSize;
|
||||
vec3 position;
|
||||
vec4 screenOffset;
|
||||
vec4 initScreen;
|
||||
float gameTime;
|
||||
float textDepth;
|
||||
int transition;
|
||||
vec2 screen;
|
||||
bool isShadow;
|
||||
} transform;
|
||||
|
||||
#moj_import <effect.glsl>
|
||||
|
||||
void hideScoreboardNumbers(vec3 position, vec3 numberColor, int vertex) {
|
||||
if(transform.position.z != position.z || gl_VertexID % vertex > 0)
|
||||
return;
|
||||
|
@ -103,8 +104,19 @@ struct Transform {
|
|||
vec4 color;
|
||||
vec4 colorMod;
|
||||
vec4 vertexColor;
|
||||
float gameTime;
|
||||
float textDepth;
|
||||
bool isShadow;
|
||||
|
||||
vec2 screenSize;
|
||||
vec2 centerUV;
|
||||
float aspectRatio;
|
||||
|
||||
int transition;
|
||||
int vertexId;
|
||||
vec2 topRight;
|
||||
vec2 bottomLeft;
|
||||
vec2 screen;
|
||||
} transform;
|
||||
|
||||
void disableShadow(float depth) {
|
||||
|
|
207
assets/minecraft/shaders/include/transition.glsl
Normal file
|
@ -0,0 +1,207 @@
|
|||
#version 150
|
||||
#if defined(RENDERTYPE_TEXT)
|
||||
|
||||
#ifdef VERTEX_SHADER
|
||||
|
||||
void offsetTransition(float marker) {
|
||||
if(int(transform.texture.b) == marker) {
|
||||
gl_Position.z = -0.26;
|
||||
}
|
||||
}
|
||||
|
||||
void initTransitions() {
|
||||
if(transform.position.z == 2400.12 || transform.position.z == 2400.06 || transform.position.z == 1000.03) {
|
||||
if(transform.texture.a == 253) {
|
||||
transform.transition = int(transform.texture.b);
|
||||
|
||||
if(transform.transition != 0) {
|
||||
transform.textureUV = vec2(transform.textureUV - transform.screen * 56 / 256);
|
||||
gl_Position.xy = vec2(transform.screen * 2 - 1) * vec2(1, -1);
|
||||
gl_Position.zw = vec2(-1, 1);
|
||||
|
||||
offsetTransition(7);
|
||||
offsetTransition(16);
|
||||
}
|
||||
|
||||
if(transform.isShadow) {
|
||||
transform.textureColor = vec4(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef FRAGMENT_SHADER
|
||||
|
||||
#define UV (transform.centerUV / vec2(transform.aspectRatio, 1))
|
||||
#define PROGRESS (cos(transform.vertexColor.a * PI / 2))
|
||||
|
||||
vec2 screen1 = round(transform.topRight / (transform.vertexId == 0 ? 1 - transform.screen.x : 1 - transform.screen.y));
|
||||
vec2 screen2 = round(transform.bottomLeft / (transform.vertexId == 0 ? transform.screen.y : transform.screen.x));
|
||||
|
||||
ivec2 resolution = ivec2(abs(screen1 - screen2));
|
||||
ivec2 offset = ivec2(min(screen1, screen2));
|
||||
|
||||
void resetColor() {
|
||||
transform.color = vec4(0);
|
||||
}
|
||||
|
||||
void transitionIris() {
|
||||
transform.color = vec4(transform.vertexColor.rgb, (length((gl_FragCoord.xy / transform.screenSize - 0.5) / vec2(transform.screenSize.y / transform.screenSize.x, 1)) + 0.1 - PROGRESS * 1.5) * (1 - PROGRESS) * 100);
|
||||
}
|
||||
|
||||
void transitionBlink() {
|
||||
transform.color = vec4(transform.vertexColor.rgb, clamp(length(transform.centerUV * vec2(1, 0.5 / (1 - transform.vertexColor.a))) - 1, 0, 1));
|
||||
}
|
||||
|
||||
void transitionSpeed(float speed, float radius, float count, float blur) {
|
||||
resetColor();
|
||||
float angle = (atan(transform.centerUV.y, transform.centerUV.x) / PI / 2 + 0.5) * count;
|
||||
float time = transform.gameTime * speed + hash(int(angle)) % 100 * 64.2343;
|
||||
float s = (abs(fract(angle) - 0.5) * 20 / count - 0.2) * length(transform.centerUV) + radius + (1 - transform.vertexColor.a) * 0.05 + abs(fract(time) - 0.5) * 0.25;
|
||||
|
||||
if(s < 0) {
|
||||
transform.color = vec4(transform.vertexColor.rgb, clamp(-s * blur, 0, 1));
|
||||
}
|
||||
}
|
||||
|
||||
void transitionDiamond() {
|
||||
vec2 grid = (ivec2(gl_FragCoord.xy / 64) * 64);
|
||||
vec2 inGrid = gl_FragCoord.xy - grid - 32;
|
||||
float size = grid.y / transform.screenSize.y;
|
||||
size = (size - transform.vertexColor.a * 2 + 1) * 64;
|
||||
|
||||
transform.color = (abs(inGrid.x) + abs(inGrid.y) > size) ? vec4(transform.vertexColor.rgb, 1) : vec4(0);
|
||||
}
|
||||
|
||||
void transitionNoise() {
|
||||
ivec2 grid = ivec2(gl_FragCoord.xy / 64) * 64;
|
||||
|
||||
transform.color = abs(hash(grid.x ^ hash(grid.y)) % 0x100) < int(transform.vertexColor.a * (length(grid / transform.screenSize.xy - 0.5) * 2 + 1) * 0x100) ? vec4(transform.vertexColor.rgb, 1) : vec4(0);
|
||||
}
|
||||
|
||||
void transitionLoad(float speed) {
|
||||
resetColor();
|
||||
float radius = length(UV);
|
||||
|
||||
if(radius >= 0.07 && radius < 0.1 && transform.vertexColor.a >= 0.99) {
|
||||
float angle = fract(-atan(UV.y, UV.x) / TAU - transform.gameTime * speed);
|
||||
transform.color = vec4(transform.vertexColor.rgb, angle);
|
||||
}
|
||||
}
|
||||
|
||||
void transitionVignette(float intensity) {
|
||||
vec2 coord = UV * (resolution.x / resolution.y);
|
||||
coord.x *= coord.x / 2.5;
|
||||
float rf = sqrt(dot(coord, coord)) * transform.aspectRatio * intensity;
|
||||
float rf2_1 = rf * rf;
|
||||
float vignette = rf2_1 * rf2_1;
|
||||
|
||||
transform.color = vec4(transform.vertexColor.rgb, vignette) * (1 - PROGRESS);
|
||||
}
|
||||
|
||||
void transitionClose(float direction) {
|
||||
float s = 2 - abs(direction / (1 - PROGRESS) - 1);
|
||||
|
||||
transform.color = vec4(transform.vertexColor.rgb, smoothstep(0, 0, s));
|
||||
}
|
||||
|
||||
void transitionFade() {
|
||||
transform.color = vec4(transform.vertexColor.rgb, mix(0, 1, (1 - PROGRESS)));
|
||||
}
|
||||
|
||||
void transitionLetterbox() {
|
||||
resetColor();
|
||||
float top = 2 - abs((transform.centerUV.y - 0.5) / (1 - PROGRESS));
|
||||
float bottom = 2 - abs((transform.centerUV.y + 0.5) / (1 - PROGRESS));
|
||||
|
||||
if(UV.y > 1 - (1.2 * 0.5))
|
||||
transform.color = vec4(transform.vertexColor.rgb, smoothstep(0, 0, top));
|
||||
if(UV.y < (-0.8 * 0.5))
|
||||
transform.color = vec4(transform.vertexColor.rgb, smoothstep(0, 0, bottom));
|
||||
}
|
||||
|
||||
void transitionWheel() {
|
||||
float circPos = atan(UV.y, UV.x) + PROGRESS * 2;
|
||||
float signed = sign(PROGRESS - mod(circPos, 3.14 / 4));
|
||||
|
||||
transform.color = vec4(transform.vertexColor.rgb, step(signed, 0.5));
|
||||
}
|
||||
|
||||
void transitionAngular(float startingAngle) {
|
||||
float os = startingAngle * PI / 180.0;
|
||||
float angle = atan(UV.y, UV.x) + os;
|
||||
float normal = (angle + PI) / (2.0 * PI);
|
||||
normal = normal - floor(normal);
|
||||
|
||||
transform.color = vec4(transform.vertexColor.rgb, step(normal, (1 - PROGRESS)));
|
||||
}
|
||||
|
||||
void transitionStatic() {
|
||||
float time = transform.gameTime * 2000;
|
||||
float t1 = time * 0.654321;
|
||||
float t2 = time * (t1 * 0.123456);
|
||||
|
||||
vec3 st = vec3(noise(UV, t1, t2));
|
||||
|
||||
transform.color = vec4(transform.vertexColor.rgb, st * (1 - PROGRESS));
|
||||
}
|
||||
|
||||
void applyTransitions() {
|
||||
if(transform.transition != 0) {
|
||||
switch(transform.transition) {
|
||||
case 1:
|
||||
transitionIris();
|
||||
break;
|
||||
case 2:
|
||||
transitionBlink();
|
||||
break;
|
||||
case 3:
|
||||
transitionSpeed(2000, 0.07, 30, 200);
|
||||
break;
|
||||
case 4:
|
||||
transitionDiamond();
|
||||
break;
|
||||
case 5:
|
||||
transitionNoise();
|
||||
break;
|
||||
case 6:
|
||||
transitionLoad(1000);
|
||||
break;
|
||||
case 7:
|
||||
transitionVignette(3);
|
||||
break;
|
||||
case 8:
|
||||
transitionClose(transform.centerUV.y - 0.5);
|
||||
break;
|
||||
case 9:
|
||||
transitionClose(transform.centerUV.y + 0.5);
|
||||
break;
|
||||
case 10:
|
||||
transitionClose(transform.centerUV.x - 0.5);
|
||||
break;
|
||||
case 11:
|
||||
transitionClose(transform.centerUV.x + 0.5);
|
||||
break;
|
||||
case 12:
|
||||
transitionFade();
|
||||
break;
|
||||
case 13:
|
||||
transitionLetterbox();
|
||||
break;
|
||||
case 14:
|
||||
transitionWheel();
|
||||
break;
|
||||
case 15:
|
||||
transitionAngular(90);
|
||||
break;
|
||||
case 16:
|
||||
transitionStatic();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||
#define PI 3.14159265359
|
||||
#define TAU 6.28318530718
|
||||
#define TAU (PI * 2)
|
||||
|
||||
const vec2[] corners = vec2[4](vec2(0, 0), vec2(0, 1), vec2(1, 1), vec2(1, 0));
|
||||
|
||||
|
@ -69,4 +69,17 @@ vec3 hsvToRgb(vec3 c) {
|
|||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||
}
|
||||
|
||||
int hash(int x) {
|
||||
x += (x << 10);
|
||||
x ^= (x >> 6);
|
||||
x += (x << 3);
|
||||
x ^= (x >> 11);
|
||||
x += (x << 15);
|
||||
return x;
|
||||
}
|
||||
|
||||
float noise(vec2 uv, float t1, float t2) {
|
||||
return fract(sin(uv.x * t1 + uv.y * t2) * 56789);
|
||||
}
|
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 116 B |
Before Width: | Height: | Size: 205 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
BIN
assets/minecraft/textures/font/screen/transition/marker.png
Normal file
After Width: | Height: | Size: 79 B |
|
@ -1 +1 @@
|
|||
{"pack":{"pack_format":46,"supported_formats":{"min_inclusive":32,"max_inclusive":46},"description":[{"text":"Wynncraft Resource Pack","color":"#bbd65a"},{"text":" "},{"text":"2.1.1","color":"gray"},{"text":"\n"},{"text":"1.21.4","color":"gray"},{"text":" "},{"text":"Dec. 27, 2024","color":"dark_gray"}]},"overlays":{"entries":[{"formats":{"min_inclusive":42,"max_inclusive":99},"directory":"1_21_2"}]}}
|
||||
{"pack":{"pack_format":46,"supported_formats":{"min_inclusive":32,"max_inclusive":46},"description":[{"text":"Wynncraft Resource Pack","color":"#bbd65a"},{"text":" "},{"text":"2.1.1","color":"gray"},{"text":"\n"},{"text":"1.21.4","color":"gray"},{"text":" "},{"text":"Jan. 20, 2025","color":"dark_gray"}]},"overlays":{"entries":[{"formats":{"min_inclusive":42,"max_inclusive":99},"directory":"1_21_2"}]}}
|