mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-11 00:31:28 -05:00
18 lines
482 B
Text
18 lines
482 B
Text
uniform sampler2D _MainTex;
|
|
uniform vec4 _LightPositionRange;
|
|
uniform float _Cutoff;
|
|
uniform vec4 _Color;
|
|
void main ()
|
|
{
|
|
vec3 tmpvar_1;
|
|
tmpvar_1 = gl_TexCoord[0].xyz;
|
|
float x;
|
|
x = ((texture2D (_MainTex, gl_TexCoord[1].xy) * _Color).w - _Cutoff);
|
|
if ((x < 0.0)) {
|
|
discard;
|
|
};
|
|
vec4 tmpvar_2;
|
|
tmpvar_2 = fract ((vec4(1.0, 255.0, 65025.0, 160580992.0) * (length (tmpvar_1) * _LightPositionRange.w)));
|
|
gl_FragData[0] = (tmpvar_2 - (tmpvar_2.yzww * 0.00392157));
|
|
}
|
|
|