Raymarcher Volume Utilities - RMVolumeUtils
Namespace: Raymarcher.Utilities
Raymarcher contains a volume utilities library (RMVolumeUtils) that allows you to work with volumes in the Raymarcher.
The library includes common volume resolutions, conversions from world to volume space, and more.
public static CommonVolumeResolution[] GetAllCommonVolumeResolutions { get; }
public static int GetCommonVolumeResolution(CommonVolumeResolution commonVolumeResolution)
public static bool TryGetCommonVolumeResolutionFromRT3D(RenderTexture entryRT3D, out CommonVolumeResolution outCommonVolumeResolution)
public static bool TryGetCommonVolumeResolutionFromTex3D(Texture3D entryTex3D, out CommonVolumeResolution outCommonVolumeResolution)
public static float ConvertWorldToVolumeSpace(float worldSpaceValueEntry, int volumeResolution, float volumeSize)
public static float ConvertVolumeToWorldSpace(float volumeSpaceValueEntry, int volumeResolution, float volumeSize)
public static Vector3 ConvertWorldToVolumeSpace(Vector3 worldSpacePosition, RMSdf_VolumeBoxBase targetVolumeBox, int volumeResolution, bool unclampedCoords = false)
public static Vector3 ConvertWorldToVolumeSpace(Vector3 worldSpacePosition, int volumeResolution, Vector3 volumeWorldPosition, Quaternion volumeWorldRotation, Vector3 volumeLocalScale, float volumeSize, bool unclampedCoords = false)
public static Vector3 ConvertVolumeToWorldSpace(Vector3 volumeSpaceCoords, int volumeResolution, Vector3 volumeWorldPosition, Quaternion volumeWorldRotation, Vector3 volumeLocalScale, float volumeSize)
public static Vector3 ConvertWorldToVolumeSpaceModuloWrap(Vector3 worldSpacePosition, RMSdf_VolumeBoxBase targetVolumeBox, int volumeResolution, bool mirrored = true)