Raymarcher Technical & APi Documentation
Raymarcher Texture Utilities - RMTextureUtils
Namespace: Raymarcher.Utilities
Raymarcher contains a texture utilities library (RMTextureUtils) that allows you to work with Unity textures within the Raymarcher framework.
Use this library to create Raymarcher-friendly 3D render textures, compare texture dimensions, and convert the working 3D render texture to a 3D texture.
// Generate a Unity Texture2DArray from a list of 2D textures (all the textures must be set to 'read/write' and the dimensions must be equal)
public static Texture2DArray GenerateTextureArray(List<Texture2D> existingTextures)

// Returns an instance index of the input tex3D from a cached texture list
public static int GetInstanceTextureIndexFromCachedTextureList(Texture2D existingTextureEntry, List<Texture2D> textureList)

// Creates a Raymarcher-friendly 3D render texture
public static RenderTexture CreateDynamic3DRenderTexture(int uniformResolution, string name)

// Creates a Raymarcher-friendly 3D render texture
public static RenderTexture CreateDynamic3DRenderTexture(int width, int height, int depth, string name)

// Compare texture dimensions with Texture 3D
public static bool CompareTex3DDimensions(Texture3D tex3D, int targetResolution)

// Compare texture dimensions with Render Texture 3D
public static bool CompareRT3DDimensions(RenderTexture rt3D, int targetResolution)

// Returns a converted RT3D
public static RenderTexture ConvertTexture3DToRenderTexture3D(Texture3D source)

// Callback results in the converted Texture3D
public static void ConvertRenderTexture3DToTexture3D(RenderTexture renderTexture3D, Action<Texture3D> callbackResult)

// EDITOR ONLY

public static void SaveRenderTexture3DToEditorAssets(RenderTexture entryRT3D)

// -----------