Skip to content

A minecraft vanilla shader that lets you to create a 3d view of a player using the 1.21.9 `Player Object` text component type.

License

Notifications You must be signed in to change notification settings

cosrnic/text-portrait-shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text based player portrait

A minecraft vanilla shader that lets you to create a 3d view of a player using the 1.21.9 Player Object text component type.

Credits to JNNGL and Origin Realms for the original portrait shader code inspiration. You can find JNNGL's shader here

Usage

/title @s title {"type":"object","object":"player",player:{name:"cosrnic"},hat:true,color:"#010000",shadow_color:0}

Implementing

Copy the assets/minecraft/shaders/include/portrait.glsl into your resource pack.

Important

This must be included after the Sampler0 is defined! You must also have #moj_import <minecraft:globals.glsl> for GameTime

Include it in your .fsh shader with #moj_import <minecraft:portrait.glsl>. Detect it using any method you want and run inside of the if statement.

fragColor = portraitRender(texCoord0, 68./70., GameTime);
if (fragColor.a < .1) discard;
fragColor.a = vertexColor.a; // keeps the transparency for when text fades
return;

To scale up the text, inside of your vsh shader, multiply the corners2[gl_VertexID % 4] by an amount

An example is in assets/minecraft/shaders/core/

About

A minecraft vanilla shader that lets you to create a 3d view of a player using the 1.21.9 `Player Object` text component type.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages