Pinned Loading
-
Convert unity texture without extens...
Convert unity texture without extension as png 1[ContextMenuItem("Yo", "Yo")]
2public Texture2D tex;
3public void Yo()
4{5Texture2D DeCompress(Texture2D source)
-
Unity memory mapped file to native a...
Unity memory mapped file to native array, to directly read write to disk file from gpu buffer.cs 1public class MMFNativeArray<T> where T : struct
2{3MemoryMappedFile mmf;
4MemoryMappedViewAccessor accessor;
5public NativeArray<T> native;
-
attempt at saving a computebuffer wi...
attempt at saving a computebuffer with asyncgpureadback, nativearray, memory mapped file.cs 1void SavePartMM(int offset = 0, int partSize = fullWidth * fullHeight * fullDepth, int chunkSizeDiv = 1024)
2{3//crashes if empty save file for some reason, too unreliable to use4var mmf = MemoryMappedFile.CreateFromFile(Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.OSXPlayer ? "/Users/user/Downloads/test.bytes" : "C:\\test.bytes", FileMode.OpenOrCreate, "apoca_save");
5 -
Unity compute shader dispatch helper...
Unity compute shader dispatch helper with better syntax 1//Example usage:2shader.Dispatch("Advect", texWidth, texHeight, texDepth,
3"_texture", texture,
4"_separationPlane", Vector3.Scale(separationPlane.position, tscale),
5"_advectFall", advectN == 0,
-
C# List that reports better OutOfRan...
C# List that reports better OutOfRange exceptions.cs 1//will throw like "[0], [1], [0], [1], [2] [0..1]"23public sealed class LastNQueue<T> : Queue<T>
4{5public int HoldLastN { get; }
-
Unity efficiently convert RenderText...
Unity efficiently convert RenderTexture to Texture3D.cs 1//input RenderTexture 'rt3D'23Texture3D output = new Texture3D(width, height, depth, rt3D.graphicsFormat, TextureCreationFlags.None);
4//assuming rt3D format to be 8 bits5var a = new NativeArray<byte>(width * height * depth, Allocator.Persistent, NativeArrayOptions.UninitializedMemory);
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.
