bgfx/3rdparty/glsl-optimizer/tests/fragment/unity-Hidden_TerrainEngine_Details_BillboardWavingDoublePass2-ir.txt
Branimir Karadzic dee3fe5266 Initial commit.
2012-04-03 20:30:07 -07:00

108 lines
1.9 KiB
Text

struct SurfaceOutput {
vec3 Albedo;
vec3 Normal;
vec3 Emission;
float Specular;
float Gloss;
float Alpha;
};
struct Input {
vec2 uv_MainTex;
vec4 color;
};
struct v2f_surf {
vec4 pos;
vec2 hip_pack0;
vec4 lop_color;
};
uniform sampler2D _MainTex;
uniform float _Cutoff;
void xll_clip (
in float x
)
{
if ((x < 0.0)) {
discard;
};
}
void surf (
in Input IN,
inout SurfaceOutput o
)
{
vec4 c;
vec4 tmpvar_1;
tmpvar_1 = texture2D (_MainTex, IN.uv_MainTex);
vec4 tmpvar_2;
tmpvar_2 = (tmpvar_1 * IN.color);
c = tmpvar_2;
vec3 tmpvar_3;
tmpvar_3 = c.xyz;
o.Albedo = tmpvar_3;
float tmpvar_4;
tmpvar_4 = c.w;
o.Alpha = tmpvar_4;
}
vec4 frag_surf (
in v2f_surf IN
)
{
SurfaceOutput o;
Input surfIN;
vec2 tmpvar_1;
tmpvar_1 = IN.hip_pack0.xy;
surfIN.uv_MainTex = tmpvar_1;
vec4 tmpvar_2;
tmpvar_2 = IN.lop_color;
surfIN.color = tmpvar_2;
vec3 tmpvar_3;
tmpvar_3 = vec3(0.0, 0.0, 0.0);
o.Albedo = tmpvar_3;
vec3 tmpvar_4;
tmpvar_4 = vec3(0.0, 0.0, 0.0);
o.Emission = tmpvar_4;
float tmpvar_5;
tmpvar_5 = 0.0;
o.Specular = tmpvar_5;
float tmpvar_6;
tmpvar_6 = 0.0;
o.Alpha = tmpvar_6;
float tmpvar_7;
tmpvar_7 = 0.0;
o.Gloss = tmpvar_7;
surf (surfIN, o);
xll_clip ((o.Alpha - _Cutoff));
return vec4(0.0, 0.0, 0.0, 0.0);
}
void main ()
{
v2f_surf xlt_IN;
vec4 xl_retval;
vec4 tmpvar_1;
tmpvar_1 = vec4(0.0, 0.0, 0.0, 0.0);
xlt_IN.pos = tmpvar_1;
vec2 tmpvar_2;
tmpvar_2 = gl_TexCoord[1].xy;
vec2 tmpvar_3;
tmpvar_3 = tmpvar_2;
xlt_IN.hip_pack0 = tmpvar_3;
vec4 tmpvar_4;
tmpvar_4 = gl_Color.xyzw;
vec4 tmpvar_5;
tmpvar_5 = tmpvar_4;
xlt_IN.lop_color = tmpvar_5;
vec4 tmpvar_6;
tmpvar_6 = frag_surf (xlt_IN);
vec4 tmpvar_7;
tmpvar_7 = tmpvar_6;
xl_retval = tmpvar_7;
vec4 tmpvar_8;
tmpvar_8 = xl_retval.xyzw;
vec4 tmpvar_9;
tmpvar_9 = tmpvar_8;
gl_FragData[0] = tmpvar_9;
}