blob: 408050d12b2af51bc12ad55d57a8991c0ad0986c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
Shader "Hidden/TextureArrayEditor"
{
Properties
{
_MainTex ("_MainTex", 2DArray) = "white" {}
_Index ("_Index", Int) = 0
}
SubShader
{
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#pragma target 3.5
#include "UnityCG.cginc"
#include "UnityStandardUtils.cginc"
uniform UNITY_DECLARE_TEX2DARRAY( _MainTex );
int _Index;
float4 frag( v2f_img i ) : SV_Target
{
//return UNITY_SAMPLE_TEX2DARRAY_LOD( _MainTex, float3( i.uv, _Index), 0 );
return UNITY_SAMPLE_TEX2DARRAY( _MainTex, float3( i.uv, _Index) );
}
ENDCG
}
}
}
|