The key of using Unity Texture array

  1. The texture array structure in different from GLSL and Unity + HLSL, the sequence of image index i and j must be adjusted. Suppose the light field has structure 16 x 16:
      1. In GLSL Shader:

      1. In Unity Shader:

  2. The program of using texture array in unity
    1. Suppose we want to load the images in folder “lytro”, we must mkdir called “Resources” in the folder “Asset”, then drag the folder “lytro” into “Resources”.