Skip to content

xelfia/XELF.MagicaVoxel.Shaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🆇🅴🅻🅵.MagicaVoxel.Shaders

  • Shaders for MagicaVoxel
    • Tested with MagicaVoxel 0.99.1a for Windows

Basic Informations

MagicaVoxel shader is a processor of vox model object. Installed MagicaVoxel shader can be used from the Console in MagicaVoxel.

Installation

Install the shader by copying the file from the 📁shader directory in this project into the 📁shader directory of your MagicaVoxel installation.

Groupable Blur

  • 🗎blur.txt: Shader file of the Groupable Blur
  • Will assist you:
    • To make a gradient.
    • To add an antialiasing effect.
    • To add a rounded corner effect.
  • Keeps it shape:
    • Empty voxel to empty voxel
    • Valid voxel to valid voxel
  • Palette can group:
    • Each group will not blur into each other.
    • Colors in the same group only will blur.
  • Shader can only access voxels:
    • Needs preparation of a proper palette you want.

Console Commands

  • xs blur color group stride center weight bias
    • color group stride: [1256] (default: 1)
    • center weight bias: [-1256] (default: 0)

Notes

  • Empty voxels (color index: 0) are grouped into -1.
  • Other valid voxels (color index: 1255) are grouped into 0+.

Command Examples

  • xs blur 8
    • Palette grasped 8tones × 32groups
    • Each row on the palette UI is an independent group
  • xs blur 256
    • Palette grasped 256tones × 1group
    • For a grayscale-like palette (255 tone levels + 1 empty)
  • xs blur 8 4
    • A bit large center weight bias=4 will work as an antialiasing effect / a rounded corner effect.
  • xs -n 3 blur 8
    • In the following sample, by one time run, the original model will become into the result of step 3.

Samples

  • blur-sample.vox: A sample vox file for the Groupable Blur
    • original➡🔨xs blur 8step 1➡🔨xs blur 8step 2➡🔨xs blur 8step 3
step 0
original
step 1
step 1
step 2
step 2
step 3
step 3