Search Unity

How to properly set multiple RWTexture2D on a ComputShader

Discussion in 'Shaders' started by Tamanoir, Mar 19, 2019.

  1. Tamanoir

    Tamanoir

    Joined:
    Aug 1, 2017
    Posts:
    27
    Hi,
    I'm currently struggling with compute shaders. I want to do a simple task witch is blending textures on a compute shader. For that I have multiple textures having the same resolution and I want to blend them all to have a single one but I don't know how to give all my RenderTextures to blend to my ComputeShader. I've looked to ComputeBuffers but I don't understand how this is working and I also don't know if this is actually a solution to my actual problem.
    Is anyone could help me ?
     
  2. Tamanoir

    Tamanoir

    Joined:
    Aug 1, 2017
    Posts:
    27
    To precise my problem, I have N RenderTextures (N define by user). I store those RenderTextures on a simple array and I want to have access to this array in my ComputeShader to compute my output texture based on the data stored on each Textures of the array.