-
Notifications
You must be signed in to change notification settings - Fork 201
Description
Hi I was wondering if you could shed some light on how to edit single voxels in realtime similar to 7 days to die or minecraft, I have created a voxel engine in the past but could not get marching cubes working and I have no experience with compute shaders. I cannot figure out how to edit the "voxel array" and update the chunk. I believe that the pointsBuffer holds the information I need however I don't know where it is safe to edit it and also what type of "Array" it is. I have tried
float[] voxels = new float[meshGen.pointsBuffer.count]; meshGen.pointsBuffer.GetData(voxels);
however it returns system.single[] and i do not know how to fix this. I tried making a 2d array but i threw a memory exception error. Any help would be greatly appreciated thank you for your time.