As the title said, I’m trying to use 3D RenderTexture to compute, in a ComputeShader, a RWTexture2D based on the data I get from two RWTexture3D. To initialize the RWTexture3D, I used isVolume = true, but this became obsolete already a long time ago. Is there any way to do it ? I didn’t find anything on that beside the isVolume thing.
Thank you !
Do you know any issues related to the refresh of the layers on this kind of 3D textures ?
I don’t know why, but after the first frame rendered in my app, the textures that I’m using, are not empty anymore even if I destroy the unity RenderTexture and recreate them.
I’m not sure what causes that, but I’ve recently experienced similar with structured buffers, even if I re-init a buffer after destroying/releasing it, I still get some junk data in there (or old data) I think I’m doing it correctly according to the docs etc. Someone more skilled than me might know, but I haven’t found any solid information on the web.
But if you’re prototyping/building something, maybe you could try add a pass to your process, just make small program you dispatch every update that zeroes everything, then proceed to writing to your 3D texture in next program. I don’t think it will add that much overhead, at least then you might something functioning.
Yes that’s exactly what I’m struggling with ! Thx for your answers I will add a pass to clear the buffers. That’s a shame because even the GL.Clear thing on the texture is not working.
Ok, Just to update my research on the refresh of the data on buffers, I still don’t know how to deal with it, because clearing buffer is not helping. However, I noticed that if I pause the unity editor and execute some frame with the “frame by frame” button, the ghost data just disappear… I don’t know how to fix this though …