Skip to content

Quick Start Tutorial

grondag edited this page Jun 22, 2020 · 14 revisions

Overview

This tutorial will walk you through writing a shader that makes stone (or some other block you choose) have an animated bluish glow! It won't teach you GLSL or much about the details, but you'll get a rough idea of what is involved and where to start.

Setting up

For this tutorial, you'll be using a resource pack. There are other ways to associate shaders with blocks, but this way requires no Java development.

You'll need Minecraft instance that includes Fabric Loader, Fabric API and Canvas 1.0 or later. In the folder where Minecraft runs, open the resourcepacks folder and create a new sub folder named shaderpack. (It can be any name, we're just using that name for the tutorial.)

In the shaderpack folder, use a text editor to create a filed named pack.mcmeta with these contents:

{
  "pack": {
    "pack_format": 5,
    "description": "Canvas shader tutorial pack"
  }
}

Within the shaderpack folder create the following subfolders:

assets/minecraft/shaders/material
assets/minecraft/materialmaps/block

Start Minecraft and confirm shaderpack is now in the list of available resource packs and then load it. Because it is empty, loading it will not have any effect.

Creating Shaders

Clone this wiki locally