bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-Diffuse1-ir.txt
2014-02-10 23:06:13 -08:00

95 lines
1.8 KiB
Text

struct SurfaceOutput {
vec3 Albedo;
vec3 Normal;
vec3 Emission;
float Specular;
float Gloss;
float Alpha;
};
struct Input {
vec2 uv_MainTex;
};
struct v2f_surf {
vec4 pos;
vec3 normal;
};
uniform vec4 _Color;
uniform sampler2D _MainTex;
void surf (
in Input IN_1,
inout SurfaceOutput o_2
)
{
vec4 c_3;
vec4 tmpvar_4;
tmpvar_4 = texture2D (_MainTex, IN_1.uv_MainTex);
vec4 tmpvar_5;
tmpvar_5 = (tmpvar_4 * _Color);
c_3 = tmpvar_5;
vec3 tmpvar_6;
tmpvar_6 = c_3.xyz;
o_2.Albedo = tmpvar_6;
float tmpvar_7;
tmpvar_7 = c_3.w;
o_2.Alpha = tmpvar_7;
}
vec4 frag_surf (
in v2f_surf IN_8
)
{
vec4 res_9;
Input surfIN_10;
SurfaceOutput o_11;
vec3 tmpvar_12;
tmpvar_12 = vec3(0.0, 0.0, 0.0);
o_11.Albedo = tmpvar_12;
vec3 tmpvar_13;
tmpvar_13 = vec3(0.0, 0.0, 0.0);
o_11.Emission = tmpvar_13;
float tmpvar_14;
tmpvar_14 = 0.0;
o_11.Specular = tmpvar_14;
float tmpvar_15;
tmpvar_15 = 0.0;
o_11.Alpha = tmpvar_15;
float tmpvar_16;
tmpvar_16 = 0.0;
o_11.Gloss = tmpvar_16;
vec3 tmpvar_17;
tmpvar_17 = IN_8.normal;
o_11.Normal = tmpvar_17;
surf (surfIN_10, o_11);
vec3 tmpvar_18;
tmpvar_18 = ((o_11.Normal * vec3(0.5, 0.5, -0.5)) + 0.5);
res_9.xyz = tmpvar_18.xyz.xyz;
float tmpvar_19;
tmpvar_19 = o_11.Specular;
res_9.w = vec4(tmpvar_19).w;
return res_9;
}
void main ()
{
v2f_surf xlt_IN_20;
vec4 xl_retval_21;
vec4 tmpvar_22;
tmpvar_22 = vec4(0.0, 0.0, 0.0, 0.0);
xlt_IN_20.pos = tmpvar_22;
vec3 tmpvar_23;
tmpvar_23 = gl_TexCoord[0].xyz;
vec3 tmpvar_24;
tmpvar_24 = tmpvar_23;
xlt_IN_20.normal = tmpvar_24;
vec4 tmpvar_25;
tmpvar_25 = frag_surf (xlt_IN_20);
vec4 tmpvar_26;
tmpvar_26 = tmpvar_25;
xl_retval_21 = tmpvar_26;
vec4 tmpvar_27;
tmpvar_27 = xl_retval_21.xyzw;
vec4 tmpvar_28;
tmpvar_28 = tmpvar_27;
gl_FragData[0] = tmpvar_28;
}