Quantcast
Channel: Questions in topic: "compute shader"
Viewing all articles
Browse latest Browse all 287

How to save ComputeBuffer?

$
0
0
I have a computebuffer that holds non-blittable types that I would like to save in some way. Ideally I would want them to serialize and never release. struct Grid{ float3 vert[15]; float4 col[15]; int index; }; RWStructuredBuffer pp; //in the object script i try this [SerializeField]public ComputeBuffer gridBuffer; The buffer is in a 3D grid type format with a fixed length equaling width*height*length. So I could make 31 seperate buffers representing the data in the struct that way it can be passed back as a blittable type but this solution seems less then ideal.

Viewing all articles
Browse latest Browse all 287


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>