Update mod version and add Mixin support
This commit is contained in:
@@ -40,7 +40,7 @@ authors="${mod_authors}" #optional
|
||||
# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value.
|
||||
# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself.
|
||||
#displayTest="MATCH_VERSION" # if nothing is specified, MATCH_VERSION is the default when clientSideOnly=false, otherwise IGNORE_ALL_VERSION when clientSideOnly=true (#optional)
|
||||
|
||||
mixinConfigs="mixins.mindmotion.json"
|
||||
# The description text for the mod (multi line!) (#mandatory)
|
||||
description='''${mod_description}'''
|
||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||
|
||||
@@ -6,23 +6,25 @@ uniform mat4 ProjMat;
|
||||
uniform vec2 OutSize;
|
||||
uniform float ShakeStrength;
|
||||
uniform float Time;
|
||||
out vec2 oneTexel;
|
||||
|
||||
out vec2 oneTexel;
|
||||
out vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
oneTexel = 1.0 / OutSize;
|
||||
// screen-shake offset in *pixels*
|
||||
float px = sin(Time * 25.0 + Position.x * 5.0) * ShakeStrength * 20.0;
|
||||
float py = cos(Time * 20.0 + Position.y * 7.0) * ShakeStrength * 20.0;
|
||||
|
||||
// convert from pixels → normalized coordinates
|
||||
vec2 offset = vec2(px / OutSize.x, py / OutSize.y);
|
||||
|
||||
vec2 shaken = Position.xy + offset;
|
||||
|
||||
texCoord = shaken / OutSize;
|
||||
|
||||
vec4 outPos = ProjMat * vec4(shaken, 0.0, 1.0);
|
||||
vec2 uv = Position.xy;
|
||||
vec2 posPx = Position.xy;
|
||||
if (Position.x > 2.0 || Position.y > 2.0) {
|
||||
uv = Position.xy / OutSize;
|
||||
posPx = Position.xy;
|
||||
} else {
|
||||
uv = Position.xy;
|
||||
posPx = Position.xy * OutSize;
|
||||
}
|
||||
float px = sin(Time * 25.0 + posPx.x * 0.01) * ShakeStrength * 20.0;
|
||||
float py = cos(Time * 20.0 + posPx.y * 0.01) * ShakeStrength * 20.0;
|
||||
vec2 uvOffset = vec2(px / OutSize.x, py / OutSize.y);
|
||||
texCoord = uv + uvOffset;
|
||||
vec4 outPos = ProjMat * vec4(posPx, 0.0, 1.0);
|
||||
gl_Position = vec4(outPos.xy, 0.0, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "net.fretux.mindmotion.mixin",
|
||||
"refmap": "mixins.mindmotion.refmap.json",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"client": [
|
||||
"PostChainAccessor"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user