Author Topic: Functions and texture packing help!  (Read 1350 times)

Hey all,

I'm working on a game which requires specific custom outputs for in game shaders. These maps are currently being made non procedurally with artists supplying bitmaps and the texturing packing happening in Unity. Ideally this would be procedurally generated and output an already packed texture from the substance.   

I'm looking for some guidance on how to best:

Isolate the 4 most significant bits and the 4 least significant bits in a channel.

Create a function to convert an input parameter into a grey scale texture for use in alpha map 
input(a) * 8 + input(b) = Alpha Value 

and any general guidance on texture packing beyond use the rgba merge node. 

Thanks in advanced






Last Edit: August 07, 2017, 08:06:15 pm

Also is it possible to bit shift with << type operator ? 

As far as I can tell, what you want to do can be achieved with a Pixel processor node with multiple inputs. You will need to specify the function to pack the input pixels together.
Bitshift and bitmask operators are not available in function graphs, but you can use sum, multiplication, division and modulo instead.