Example #1
0
 /*Save to texture*/
 public static void EncodeSurfaceRegion(SurfaceBiomeDatabase.SurfaceBiome encode, Texture2D dataTexture, int index, out int nextIndex)
 {
     nextIndex = index;
     TextureEncoder.EncodeFloat(encode.Height, dataTexture, nextIndex, out nextIndex);
     TextureEncoder.EncodeFloat(encode.Floor, dataTexture, nextIndex, out nextIndex);
     TextureEncoder.EncodeFloat(encode.AdditiveHeightLimit, dataTexture, nextIndex, out nextIndex);
     GradientEncoder.EncodeGradient(encode.GroundPalette, dataTexture, nextIndex, out nextIndex);
     GradientEncoder.EncodeGradient(encode.WallPalette, dataTexture, nextIndex, out nextIndex);
 }
 /*Save to texture*/
 public static void EncodeCaveRegion(CaveBiomeDatabase.CaveBiome encode, Texture2D dataTexture, int index, out int nextIndex)
 {
     nextIndex = index;
     GradientEncoder.EncodeGradient(encode.GroundPalette, dataTexture, nextIndex, out nextIndex);
     GradientEncoder.EncodeGradient(encode.WallPalette, dataTexture, nextIndex, out nextIndex);
 }