Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Graphics ComputeShader.SetTextures for Texture2DArray or TextureCubeArray ?

Discussion in '5.4 Beta' started by raphael-ernaelsten-heaj, Apr 15, 2016.

  1. raphael-ernaelsten-heaj

    raphael-ernaelsten-heaj

    Joined:
    Mar 9, 2016
    Posts:
    78
    Hello,

    I am trying to find a way to pass an array of textures to my compute shader wherein Texture2DArray<float> xxx and TextureCubeArray<float> yyy are declared.
    Practically, I want to feed a dynamic amount of shadowmaps to my compute shader.

    However I did not find a way to pass those arrays (of RenderTextures) to it.
    As there is no SetTextures method, I wonder if there was an other way of doing such (?)

    Also, I am a bit confused about the new Texture2DArray c# class. Is this what I am looking for?
    Any light on this?

    Thank you very much!
     
  2. raphael-ernaelsten-heaj

    raphael-ernaelsten-heaj

    Joined:
    Mar 9, 2016
    Posts:
    78
    Ok that was it at least for Texture2DArray, I still have to try with TextureCubeArray.

     
  3. Alex-Lian

    Alex-Lian

    Guest

  4. raphael-ernaelsten-heaj

    raphael-ernaelsten-heaj

    Joined:
    Mar 9, 2016
    Posts:
    78
    Thanks! Indeed it worked.