- Home /
Question by
schwollie · Mar 25, 2020 at 01:29 PM ·
shader programminggpucompute shaderhlsl
Persistent Data in Compute Shaders.
Hey there, I have created a little raytracer in unity using the compute shader and now I want to store (for example) the last 100 outputs on the GPU memory for later calculations. The CPU does not need to have any access to this data so there is no need to shift this data between the GPU and the CPU. Up to now I have not seen any opportunity to initialize data directly from the compute shader with HLSL. Is there any way to create an array of Texture2D and initialize it on the GPU or do you know another workaround? I ask this question as a newcomer to graphics programming so I don't know if this is even possible, but I would appreciate if somebody could explain me how to achieve this simple task.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612225713im_/https://answers.unity.com/themes/thub/images/avi.jpg)