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

22 lines
601 B
Text

uniform float _Treshold;
uniform sampler2D _MainTex;
void main ()
{
vec2 tmpvar_1[3];
tmpvar_1[0] = gl_TexCoord[0].xy;
tmpvar_1[1] = gl_TexCoord[1].xy;
tmpvar_1[2] = gl_TexCoord[2].xy;
vec4 original;
vec4 tmpvar_2;
tmpvar_2 = texture2D (_MainTex, tmpvar_1[0]);
original = tmpvar_2;
vec3 tmpvar_3;
tmpvar_3 = (((tmpvar_2.xyz * 2.0) - texture2D (_MainTex, tmpvar_1[1]).xyz) - texture2D (_MainTex, tmpvar_1[2]).xyz);
float tmpvar_4;
tmpvar_4 = dot (tmpvar_3, tmpvar_3);
if ((tmpvar_4 >= _Treshold)) {
original.xyz = vec3(0.0, 0.0, 0.0);
};
gl_FragData[0] = original;
}