- Home /
Question by
LightenFor · Mar 20, 2015 at 11:28 AM ·
programminggputypecompute shader
DirectCompute 1byte data type... Is it exist?
Need to load into compute shader byte array and work with it per byte computation, but I couldn't find 1 byte datatype!!! Help me, please!
Comment
Answer by Landern · Mar 20, 2015 at 01:38 PM
convert to a float:
System.BitConverter.ToSingle()/MSDN(array) or System.Convert.ToSingle
And a post on 4 byte convert to float4 on the forums for nice shadows
Ok, that means there is no byte type in compute shader? I need byte array in shader to pack Sparse Voxel Octree into byte array.
Your answer
![](https://koobas.hobune.stream/wayback/20220613190731im_/https://answers.unity.com/themes/thub/images/avi.jpg)