bgfx/3rdparty/glsl-optimizer/tests/fragment/zun-Self-Illumin_Specular1-ir.txt

114 lines
2.3 KiB
Text
Raw Normal View History

2012-10-07 23:41:18 -04:00
struct SurfaceOutput {
vec3 Albedo;
vec3 Normal;
vec3 Emission;
float Specular;
float Gloss;
float Alpha;
};
struct Input {
vec2 uv_MainTex;
vec2 uv_Illum;
};
struct v2f_surf {
vec4 pos;
vec3 normal;
};
uniform float _Shininess;
uniform sampler2D _MainTex;
uniform sampler2D _Illum;
uniform vec4 _Color;
void surf (
in Input IN_1,
inout SurfaceOutput o_2
)
{
vec4 c_3;
vec4 tex_4;
vec4 tmpvar_5;
tmpvar_5 = texture2D (_MainTex, IN_1.uv_MainTex);
vec4 tmpvar_6;
tmpvar_6 = tmpvar_5;
tex_4 = tmpvar_6;
vec4 tmpvar_7;
tmpvar_7 = (tex_4 * _Color);
c_3 = tmpvar_7;
vec3 tmpvar_8;
tmpvar_8 = c_3.xyz;
o_2.Albedo = tmpvar_8;
vec4 tmpvar_9;
tmpvar_9 = texture2D (_Illum, IN_1.uv_Illum);
vec3 tmpvar_10;
tmpvar_10 = (c_3.xyz * tmpvar_9.w);
o_2.Emission = tmpvar_10;
float tmpvar_11;
tmpvar_11 = tex_4.w;
o_2.Gloss = tmpvar_11;
float tmpvar_12;
tmpvar_12 = c_3.w;
o_2.Alpha = tmpvar_12;
float tmpvar_13;
tmpvar_13 = _Shininess;
o_2.Specular = tmpvar_13;
}
vec4 frag_surf (
in v2f_surf IN_14
)
{
vec4 res_15;
Input surfIN_16;
SurfaceOutput o_17;
vec3 tmpvar_18;
tmpvar_18 = vec3(0.0, 0.0, 0.0);
o_17.Albedo = tmpvar_18;
vec3 tmpvar_19;
tmpvar_19 = vec3(0.0, 0.0, 0.0);
o_17.Emission = tmpvar_19;
float tmpvar_20;
tmpvar_20 = 0.0;
o_17.Specular = tmpvar_20;
float tmpvar_21;
tmpvar_21 = 0.0;
o_17.Alpha = tmpvar_21;
float tmpvar_22;
tmpvar_22 = 0.0;
o_17.Gloss = tmpvar_22;
vec3 tmpvar_23;
tmpvar_23 = IN_14.normal;
o_17.Normal = tmpvar_23;
surf (surfIN_16, o_17);
vec3 tmpvar_24;
tmpvar_24 = ((o_17.Normal * vec3(0.5, 0.5, -0.5)) + 0.5);
res_15.xyz = tmpvar_24.xyz.xyz;
float tmpvar_25;
tmpvar_25 = o_17.Specular;
res_15.w = vec4(tmpvar_25).w;
return res_15;
}
void main ()
{
v2f_surf xlt_IN_26;
vec4 xl_retval_27;
vec4 tmpvar_28;
tmpvar_28 = vec4(0.0, 0.0, 0.0, 0.0);
xlt_IN_26.pos = tmpvar_28;
vec3 tmpvar_29;
tmpvar_29 = gl_TexCoord[0].xyz;
vec3 tmpvar_30;
tmpvar_30 = tmpvar_29;
xlt_IN_26.normal = tmpvar_30;
vec4 tmpvar_31;
tmpvar_31 = frag_surf (xlt_IN_26);
vec4 tmpvar_32;
tmpvar_32 = tmpvar_31;
xl_retval_27 = tmpvar_32;
vec4 tmpvar_33;
tmpvar_33 = xl_retval_27.xyzw;
vec4 tmpvar_34;
tmpvar_34 = tmpvar_33;
gl_FragData[0] = tmpvar_34;
}