-
-
Save sakura-crowd/4dd62157e0c14b809b772ac977dc697b to your computer and use it in GitHub Desktop.
ボクセルエディター MagicaVoxel で用いる自作 Shader です。 box シェーダーは指定された直方体範囲を指定された色のボクセルで塗りつぶします。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// xs_begin | |
// author : 'SakuraCrowd' | |
// xs_end | |
//===== built-in args ===== | |
// uniform float i_color_index; // current color index [0-255] | |
//===== built-in functions ===== | |
// 範囲内全てに対して選択しているカラーインデックスを返し、選択範囲の直方体をその色のボクセルで塗りつぶします。 | |
float map( vec3 v ) { | |
return i_color_index; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment