Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Under built-in-RP, are there UNITY_ARGS_TEX2DARRAY and UNITY_PASS_TEX2DARRAY without sampler?

Discussion in 'Shaders' started by zwcloud, Mar 28, 2023.

  1. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    372
    In HLSLSupport.cginc, UNITY_PASS_TEX2DARRAY is defined as follows:

    on DirectX platforms,
    Code (shader):
    1. #define UNITY_ARGS_TEX2DARRAY(tex) Texture2DArray tex, SamplerState sampler##tex
    2. #define UNITY_PASS_TEX2DARRAY(tex) tex, sampler##tex
    on OpenGL platforms (DX9 style HLSL syntax; same object for texture+sampler),
    Code (shader):
    1. #define UNITY_ARGS_TEX2DARRAY(tex) sampler2DArray tex
    2. #define UNITY_PASS_TEX2DARRAY(tex) tex
    There are UNITY_DECLARE_TEX2DARRAY_NOSAMPLER, so are there _NOSAMPLER version of UNITY_ARGS_TEX2DARRAY and UNITY_PASS_TEX2DARRAY?
     
    Last edited: Mar 28, 2023
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,739
    Looks like there's none.
    I'll add them.
     
    zwcloud likes this.