mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-01 11:56:58 -05:00
22 lines
527 B
Text
22 lines
527 B
Text
uniform sampler2D _MainTex;
|
|
uniform float _Cutoff;
|
|
void main ()
|
|
{
|
|
vec4 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[1];
|
|
float x;
|
|
x = (texture2D (_MainTex, gl_TexCoord[0].xy).w - _Cutoff);
|
|
if ((x < 0.0)) {
|
|
discard;
|
|
};
|
|
vec4 enc;
|
|
enc.xy = ((((tmpvar_1.xy / (tmpvar_1.z + 1.0)) / 1.7777) * 0.5) + 0.5);
|
|
vec2 enc_i0_i1;
|
|
vec2 tmpvar_2;
|
|
tmpvar_2 = fract ((vec2(1.0, 255.0) * tmpvar_1.w));
|
|
enc_i0_i1 = tmpvar_2;
|
|
enc_i0_i1.x = (tmpvar_2.x - (tmpvar_2.y * 0.00392157));
|
|
enc.zw = enc_i0_i1;
|
|
gl_FragData[0] = enc;
|
|
}
|
|
|