mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 11:05:36 -05:00
22 lines
550 B
Text
22 lines
550 B
Text
uniform vec4 _Color;
|
|
uniform float _Cutoff;
|
|
uniform vec4 _LightPositionRange;
|
|
uniform sampler2D _MainTex;
|
|
void main ()
|
|
{
|
|
vec3 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0].xyz;
|
|
float x_2;
|
|
x_2 = ((texture2D (_MainTex, gl_TexCoord[1].xy) * _Color).w - _Cutoff);
|
|
if ((x_2 < 0.0)) {
|
|
discard;
|
|
};
|
|
vec4 tmpvar_3;
|
|
tmpvar_3 = fract((vec4(1.0, 255.0, 65025.0, 1.60581e+08) * (
|
|
sqrt(dot (tmpvar_1, tmpvar_1))
|
|
* _LightPositionRange.w)));
|
|
gl_FragData[0] = (tmpvar_3 - (tmpvar_3.yzww * 0.00392157));
|
|
}
|
|
|
|
|
|
// inputs: 1, stats: 10 alu 2 tex 1 flow
|