Closed barraudf closed 9 years ago
This is definitely a nice way to deal with transparency and even masking for animation purposes. When I was talking with @gltracy, he mentioned something similar but I just decided to wait for him to implement the layer feature. I'll merge this as soon as possible.
I wanted my models to use transparency, and until MagicaVoxel support it, here is a workaround I have set up : on vox model loaging, another model can be loaded as an alpha mask.
How does it work?
Two models are loaded, one for color data and the other for alpha value :
For the alpha mask model, color index is used as alpha value (the color itself doesn't matter at all), independently of the palette (index 1 means fully transparent and index 255 means fully opaque) :
ps : my shader is not very nice at the moment, but I'm totally new to this stuff and that's the best I could do. Plus I can't get your shader to work, everything is black.