1+ #version 300 es
2+ #ifndef UNITY_RUNTIME_INSTANCING_ARRAY_SIZE
3+ #define UNITY_RUNTIME_INSTANCING_ARRAY_SIZE 2
4+ #endif
5+ precision highp float ;
6+ precision highp int ;
7+ #define HLSLCC_ENABLE_UNIFORM_BUFFERS 1
8+ #if HLSLCC_ENABLE_UNIFORM_BUFFERS
9+ #define UNITY_UNIFORM
10+ #else
11+ #define UNITY_UNIFORM uniform
12+ #endif
13+ #define UNITY_SUPPORTS_UNIFORM_LOCATION 1
14+ #if UNITY_SUPPORTS_UNIFORM_LOCATION
15+ #define UNITY_LOCATION(x) layout (location = x)
16+ #define UNITY_BINDING(x) layout (binding = x, std140)
17+ #else
18+ #define UNITY_LOCATION(x)
19+ #define UNITY_BINDING(x) layout (std140)
20+ #endif
21+ uniform int unity_BaseInstanceID;
22+ uniform mediump float _CustomFogAttenuation;
23+ uniform mediump float _CustomFogOffset;
24+ uniform mediump float _CustomFogHeightFogStartY;
25+ uniform mediump float _CustomFogHeightFogHeight;
26+ uniform mediump float _BaseColorBoost;
27+ uniform mediump float _BaseColorBoostThreshold;
28+ uniform float _FogStartOffset;
29+ uniform float _FogScale;
30+ uniform mediump float _FogHeightScale;
31+ uniform mediump float _FogHeightOffset;
32+ uniform float _CutoutTexScale;
33+ #if HLSLCC_ENABLE_UNIFORM_BUFFERS
34+ UNITY_BINDING(0 ) uniform UnityStereoGlobals {
35+ #endif
36+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_StereoMatrixP[8 ];
37+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_StereoMatrixV[8 ];
38+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_StereoMatrixInvV[8 ];
39+ UNITY_UNIFORM vec4 hlslcc_mtx4x4unity_StereoMatrixVP[8 ];
40+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_StereoCameraProjection[8 ];
41+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_StereoCameraInvProjection[8 ];
42+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_StereoWorldToCamera[8 ];
43+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_StereoCameraToWorld[8 ];
44+ UNITY_UNIFORM vec3 unity_StereoWorldSpaceCameraPos[2 ];
45+ UNITY_UNIFORM vec4 Xhlslcc_UnusedXunity_StereoScaleOffset[2 ];
46+ #if HLSLCC_ENABLE_UNIFORM_BUFFERS
47+ };
48+ #endif
49+ struct unity_Builtins0Array_Type {
50+ vec4 hlslcc_mtx4x4unity_ObjectToWorldArray[4 ];
51+ vec4 hlslcc_mtx4x4unity_WorldToObjectArray[4 ];
52+ };
53+ #if HLSLCC_ENABLE_UNIFORM_BUFFERS
54+ UNITY_BINDING(1 ) uniform UnityInstancing_PerDraw0 {
55+ #endif
56+ UNITY_UNIFORM unity_Builtins0Array_Type unity_Builtins0Array[128 ];
57+ #if HLSLCC_ENABLE_UNIFORM_BUFFERS
58+ };
59+ #endif
60+ struct PropsArray_Type {
61+ mediump vec4 _Color;
62+ mediump vec4 _SizeParams;
63+ float _Cutout;
64+ vec4 _CutoutTexOffset;
65+ };
66+ #if HLSLCC_ENABLE_UNIFORM_BUFFERS
67+ UNITY_BINDING(2 ) uniform UnityInstancing_Props {
68+ #endif
69+ UNITY_UNIFORM PropsArray_Type PropsArray[128 ];
70+ #if HLSLCC_ENABLE_UNIFORM_BUFFERS
71+ };
72+ #endif
73+ UNITY_LOCATION(0 ) uniform mediump sampler3D _CutoutTex;
74+ UNITY_LOCATION(1 ) uniform mediump sampler2D _BloomPrePassTexture;
75+ in highp vec3 vs_TEXCOORD1;
76+ in mediump vec4 vs_TEXCOORD2;
77+ flat in highp uint vs_SV_InstanceID0;
78+ layout (location = 0 ) out mediump vec4 SV_Target0;
79+ float u_xlat0;
80+ ivec2 u_xlati0;
81+ mediump float u_xlat16_1;
82+ mediump float u_xlat16_2;
83+ vec3 u_xlat3;
84+ mediump vec3 u_xlat16_3;
85+ bool u_xlatb3;
86+ mediump vec3 u_xlat16_4;
87+ mediump float u_xlat16_7;
88+ void main()
89+ {
90+ u_xlati0.x = int (vs_SV_InstanceID0) + unity_BaseInstanceID;
91+ u_xlati0.xy = ivec2 (u_xlati0.x << (int (2 ) & int (0x1F)), u_xlati0.x << (int (3 ) & int (0x1F)));
92+ u_xlat3.xyz = vs_TEXCOORD1.xyz + (- unity_Builtins0Array[u_xlati0.y / 8 ].hlslcc_mtx4x4unity_ObjectToWorldArray[3 ].xyz);
93+ u_xlat3.xyz = u_xlat3.xyz + PropsArray[u_xlati0.x / 4 ]._CutoutTexOffset.xyz;
94+ u_xlat3.xyz = u_xlat3.xyz * vec3 (_CutoutTexScale);
95+ u_xlat16_3.x = texture(_CutoutTex, u_xlat3.xyz).w;
96+ u_xlat3.x = (- PropsArray[u_xlati0.x / 4 ]._Cutout) * 1.10000002 + u_xlat16_3.x;
97+ u_xlat3.x = u_xlat3.x + 0.100000001 ;
98+ u_xlatb3 = u_xlat3.x< 0.0 ;
99+ if (u_xlatb3){discard ;}
100+ u_xlat3.xyz = vs_TEXCOORD1.xyz + (- unity_StereoWorldSpaceCameraPos[0 ].xyz);
101+ u_xlat3.x = dot (u_xlat3.xyz, u_xlat3.xyz);
102+ u_xlat16_1 = u_xlat3.x + (- _FogStartOffset);
103+ u_xlat16_1 = max (u_xlat16_1, 0.0 );
104+ u_xlat16_1 = u_xlat16_1 * _FogScale + (- _CustomFogOffset);
105+ u_xlat16_1 = max (u_xlat16_1, 0.0 );
106+ u_xlat16_1 = u_xlat16_1 * _CustomFogAttenuation + 1.0 ;
107+ u_xlat16_1 = float (1.0 ) / u_xlat16_1;
108+ u_xlat3.x = vs_TEXCOORD1.y * _FogHeightScale + _FogHeightOffset;
109+ u_xlat16_4.x = _CustomFogHeightFogHeight + _CustomFogHeightFogStartY;
110+ u_xlat16_4.x = u_xlat3.x + (- u_xlat16_4.x);
111+ u_xlat16_4.x = u_xlat16_4.x / _CustomFogHeightFogHeight;
112+ u_xlat16_4.x = clamp (u_xlat16_4.x, 0.0 , 1.0 );
113+ u_xlat16_7 = u_xlat16_4.x * u_xlat16_4.x;
114+ u_xlat16_4.x = (- u_xlat16_4.x) * 2.0 + 3.0 ;
115+ u_xlat16_4.x = u_xlat16_4.x * u_xlat16_7;
116+ u_xlat16_1 = u_xlat16_4.x * (- u_xlat16_1) + 1.0 ;
117+ u_xlat16_4.xy = vs_TEXCOORD2.xy / vs_TEXCOORD2.ww;
118+ u_xlat16_3.xyz = texture(_BloomPrePassTexture, u_xlat16_4.xy).xyz;
119+ u_xlat16_4.xyz = u_xlat16_3.xyz + (- PropsArray[u_xlati0.x / 4 ]._Color.xyz);
120+ SV_Target0.xyz = vec3 (u_xlat16_1) * u_xlat16_4.xyz + PropsArray[u_xlati0.x / 4 ]._Color.xyz;
121+ u_xlat0 = PropsArray[u_xlati0.x / 4 ]._Color.w + PropsArray[u_xlati0.x / 4 ]._Color.w;
122+ SV_Target0.w = u_xlat16_1 * (- u_xlat0) + u_xlat0;
123+ return ;
124+ }
0 commit comments