bgfx/3rdparty/glsl-optimizer/tests/fragment/prec-inlineexpr1-irES.txt

65 lines
1.3 KiB
Text
Raw Normal View History

2012-04-03 23:30:07 -04:00
varying mediump vec2 xlv_TEXCOORD0;
uniform mediump float _EmberFadeStart;
uniform mediump float _EmberFadeEnd;
uniform sampler2D _BurntTex;
uniform sampler2D _MainTex;
float xll_saturate (
2012-10-07 23:41:18 -04:00
in float x_1
2012-04-03 23:30:07 -04:00
)
{
2012-10-07 23:41:18 -04:00
float tmpvar_2;
tmpvar_2 = clamp (x_1, 0.0, 1.0);
return tmpvar_2;
2012-04-03 23:30:07 -04:00
}
vec3 xll_saturate (
2012-10-07 23:41:18 -04:00
in vec3 x_3
2012-04-03 23:30:07 -04:00
)
{
2012-10-07 23:41:18 -04:00
vec3 tmpvar_4;
tmpvar_4 = clamp (x_3, 0.0, 1.0);
return tmpvar_4;
2012-04-03 23:30:07 -04:00
}
lowp vec4 frag (
2012-10-07 23:41:18 -04:00
in mediump vec2 uv_5
2012-04-03 23:30:07 -04:00
)
{
2012-10-07 23:41:18 -04:00
lowp float t_6;
lowp vec3 burn_7;
lowp vec3 base_8;
2012-04-03 23:30:07 -04:00
lowp vec4 tmpvar_9;
2012-10-07 23:41:18 -04:00
tmpvar_9 = texture2D (_MainTex, uv_5);
lowp vec3 tmpvar_10;
tmpvar_10 = tmpvar_9.xyz;
base_8 = tmpvar_10;
lowp vec4 tmpvar_11;
tmpvar_11 = texture2D (_BurntTex, uv_5);
lowp vec3 tmpvar_12;
tmpvar_12 = tmpvar_11.xyz;
burn_7 = tmpvar_12;
float tmpvar_13;
tmpvar_13 = xll_saturate (((_EmberFadeStart - 0.05) / (_EmberFadeStart - _EmberFadeEnd)));
float tmpvar_14;
tmpvar_14 = tmpvar_13;
t_6 = tmpvar_14;
lowp vec3 tmpvar_15;
tmpvar_15 = vec3(t_6);
lowp vec3 tmpvar_16;
tmpvar_16 = mix (base_8, burn_7, tmpvar_15);
lowp vec4 tmpvar_17;
tmpvar_17.w = 1.0;
tmpvar_17.xyz = tmpvar_16.xyz;
return tmpvar_17;
2012-04-03 23:30:07 -04:00
}
void main ()
{
2012-10-07 23:41:18 -04:00
lowp vec4 tmpvar_18;
tmpvar_18 = frag (xlv_TEXCOORD0);
lowp vec4 tmpvar_19;
tmpvar_19 = tmpvar_18;
gl_FragColor = tmpvar_19;
2012-04-03 23:30:07 -04:00
}