Image Shader
Only use a shader to display an image on your screen~

Что это
Only use a shader to display an image on your screen~
- Тип: шейдеры
- Загрузчик: iris
- Версии Minecraft: 1.16 – 1.21.8
- Скачиваний на Modrinth: 6 717
Подробно
Image Shader Only use a shader to display an image on your screen~ Note: compiling the shader may take some time!
How to prepare a custom image~ First, use ffmpeg (or any tool) to resize your image to 160×160 pixels.
bash Using ffmpeg: ffmpeg -i Input.png -vf scale=160:160 image.png
Then place the resized image in the same directory as the Python script below. Run the script to produce an imagechunks folder, then copy the 16 .glsl files inside into shaders/data/imagechunks (you need to unpack the shader pack first). Enter the game, enable the custom image option in the shader settings, and wait for the shader to finish compiling — Then it's ok~
A Python Script python from PIL import Image import os
def generateglslchunks(imagepath, outputdir="imagechunks"): try: img = Image.open(imagepath).convert('RGBA') except FileNotFoundError: print(f"Error: Image file not found at {imagepath}") return
width, height = img.size if width != 160 or height != 160: print(f"Error: Image must be 160x160 pixels, but it is {width}x{height}.") print(f"You can use:") print(f"ffmpeg -i image.png -vf scale=160:160 output.png") print(f"to adjust the image resolution.") return os.makedirs(outputdir, existok=True) chunksize = 40 numchunksx = width // chunksize numchunksy = height // chunksize
for chunky in range(numchunksy): for chunkx in range(numchunksx): left = chunkx chunksize upper = chunky chunksize right = left + chunksize lower = upper + chunksize subimg = img.crop((left, upper, right, lower)) pixeldata = list(subimg.getdata())
arrayname = f"imagedata{chunky}{chunkx}" outputfilepath = os.path.join(outputdir, f"{arrayname}.glsl")
glslarray = f"vec4 {arrayname}[{chunksize chunksize}] = vec4{chunksize chunksize}: r, g, b, a = pixel glslarray += f" vec4({r/255.0}, {g/255.0}, {b/255.0}, {a/255.0})" if i < len(pixeldata) - 1: glslarray += "," if (i + 1) % 4 == 0: glslarray += "\n" glslarray += ");\n"
with open(outputfilepath, 'w') as f: f.write(glslarray) print(f"Generated file: {outputfilepath}")
--- Config --- imagefile = "image.png" outputdirectory = "imagechunks"
generateglslchunks(imagefile, outputdirectory)
Как установить
Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.
Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.
Комментарии 0
Комментарии к этому материалу отключены.
Читайте также
SmartEX
SmartEX — Realistic explosion physics and TNT stacking. 05.12.2026
TabListExtension
扩展TAB列表显示功能 Extended TAB list display 05.12.2026
To the Bat Poles!
Sliding down those iron bars 05.12.2026
F1 2026 Boat 32x
This is a F1 2026 Boat Resource Pack by AdamixGaming, Jerpix and NotGatoz 05.12.2026
RoadTrip Create Aeronautics
modpack for building vehicles and mobile bases aroud Create Aeronautics 05.12.2026