Home Unity

Shader Forge: Multiple masks packed into single channel

overhira
polycounter lvl 3
Offline / Send Message
overhira polycounter lvl 3
Hey all,

I've been thinking of a way to pack multiple splat maps into a single RGB channel. My thought is that given the full range of 256 values, we can pack multiple masks into a certain value range. For example, for a 3 mask set up in 1 channel: Mask A would exist between 0 and 85, B would exist between 86 and 170, and C would exist between 171 and 255. This would allow for an RGB texture to contain more than 3 masks (1 for each channel), the only limiter being the granularity/transition between masks (ie: range allocated for each mask).

Has anyone attempted something similar? Or even better, got something hooked up in Shader Forge or another node based shader editor?

Replies

Sign In or Register to comment.