How to stop seeing the migration cape on other players

minecraft-java-editionminecraft-mods

Background

The Migration cape was rolled out to all eligible players who bought Minecraft before December 1, 2020 and migrated their Mojang or legacy account to a Microsoft account.
Minecraft Migration cape

Turning off the Migration cape

I want to stop seeing the Migration cape on other players.

You can turn off your own cape via this setting in Options > Skin Customization:
Disable your cape via Options

…but there is no option to stop seeing the migration cape on other players.

Does anyone have a solution to this problem?

Texture pack editing and/or mods are both acceptable solutions, as long as they also revert the elytra into the original design. If a solution requires disabling the ability to see all capes, that is undesirable but acceptable.

Thank you!

Best Answer

Capes can be removed by modifying the game's Core Shaders via a resourcepack (possible 1.17 and onwards).


The rendertype_entity_solid.fsh shader controls the cape rendering. The cape can be made entirely transparent by inserting this bit of code:

if (hasCape){
    discard;
}

Like so:

#version 150

#moj_import <fog.glsl>

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) * vertexColor * ColorModulator;
    bool hasCape = textureSize(Sampler0, 0) == ivec2(64,32);
    if (hasCape){
        discard;
    }
    color.rgb = mix(overlayColor.rgb, color.rgb, overlayColor.a);
    color *= lightMapColor;
    fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor);
}

The rendertype_armor_cutout_no_cull.vsh shader controls armor rendering, including elytra. The cape texture can be removed from the elytra by inserting the following code by McTsts:

    // removes cape elytras
    vec2 texSize = textureSize(Sampler0,0);
    if( texSize.x == 64 && texSize.y == 32 && // check if size matches a cape
            texture(Sampler0, vec2(0.0, 1.0/32.0)).a == 1.0 && texture(Sampler0, vec2(12.0/64.0, 16.0/32.0)).a == 1.0 && // check if skin transparent pixels have color
            (   // support both types of cape texture
                (texture(Sampler0, vec2(0.0, 18.0/32.0)) == vec4(1.0) && texture(Sampler0, vec2(0.99, 0.99)) == vec4(1.0) && texture(Sampler0, vec2(0.99, 0.0)) == vec4(1.0)) // for capes filled with white, check for white pixels
                || (texture(Sampler0, vec2(25.0/64.0, 25.0/32.0)).a == 0.0 || texture(Sampler0, vec2(30.0/64.0, 10.0/32.0)).a == 0.0 || texture(Sampler0, vec2(9.0/64.0, 25.0/32.0)).a == 0.0)  // otherwise check of transparent pixels
            )
    ) gl_Position = vec4(0.0);

Like so:

#version 150

#moj_import <light.glsl>

in vec3 Position;
in vec4 Color;
in vec2 UV0;
in vec2 UV1;
in ivec2 UV2;
in vec3 Normal;

uniform sampler2D Sampler0;
uniform sampler2D Sampler2;

uniform mat4 ModelViewMat;
uniform mat4 ProjMat;

uniform vec3 Light0_Direction;
uniform vec3 Light1_Direction;

out float vertexDistance;
out vec4 vertexColor;
out vec2 texCoord0;
out vec2 texCoord1;
out vec4 normal;

void main() {
    gl_Position = ProjMat * ModelViewMat * vec4(Position, 1.0);

    vertexDistance = length((ModelViewMat * vec4(Position, 1.0)).xyz);
    vertexColor = minecraft_mix_light(Light0_Direction, Light1_Direction, Normal, Color) * texelFetch(Sampler2, UV2 / 16, 0);
    texCoord0 = UV0;
    texCoord1 = UV1;
    normal = ProjMat * ModelViewMat * vec4(Normal, 0.0);
    
    // removes cape elytras
    vec2 texSize = textureSize(Sampler0,0);
    if( texSize.x == 64 && texSize.y == 32 && // check if size matches a cape
            texture(Sampler0, vec2(0.0, 1.0/32.0)).a == 1.0 && texture(Sampler0, vec2(12.0/64.0, 16.0/32.0)).a == 1.0 && // check if skin transparent pixels have color
            (   // support both types of cape texture
                (texture(Sampler0, vec2(0.0, 18.0/32.0)) == vec4(1.0) && texture(Sampler0, vec2(0.99, 0.99)) == vec4(1.0) && texture(Sampler0, vec2(0.99, 0.0)) == vec4(1.0)) // for capes filled with white, check for white pixels
                || (texture(Sampler0, vec2(25.0/64.0, 25.0/32.0)).a == 0.0 || texture(Sampler0, vec2(30.0/64.0, 10.0/32.0)).a == 0.0 || texture(Sampler0, vec2(9.0/64.0, 25.0/32.0)).a == 0.0)  // otherwise check of transparent pixels
            )
    ) gl_Position = vec4(0.0);
}

Resourcepack download