forked from core/sinfar-haks
43 lines
910 B
Plaintext
43 lines
910 B
Plaintext
/*=============================================================================
|
|
fs_plt_hair.shd
|
|
=============================================================================*/
|
|
|
|
#define SHADER_TYPE 2
|
|
|
|
#define LIGHTING 1
|
|
#define FOG 1
|
|
#define KEYHOLING 1
|
|
|
|
#define NORMAL_MAP 1
|
|
#define SPECULAR_MAP 1
|
|
#define ROUGHNESS_MAP 1
|
|
#define HEIGHT_MAP 0
|
|
#define SELF_ILLUMINATION_MAP 1
|
|
#define ENVIRONMENT_MAP 1
|
|
|
|
#include "inc_standard"
|
|
|
|
uniform float fAlpha;
|
|
void main ()
|
|
{
|
|
FragmentColor = vec4(1.0);
|
|
SetupStandardShaderInputs();
|
|
float fAlphaFromTexture = texture2D(texUnit1, vTexCoords.xy).a;
|
|
if (fAlpha == 0.0){
|
|
if (fAlphaFromTexture < 0.2)
|
|
{
|
|
discard;
|
|
}
|
|
ApplyStandardShader();
|
|
gl_FragColor = vec4(FragmentColor.rgb, fAlphaFromTexture);
|
|
}
|
|
else{
|
|
if (fAlphaFromTexture < fAlpha)
|
|
{
|
|
discard;
|
|
}
|
|
ApplyStandardShader();
|
|
gl_FragColor = vec4(FragmentColor.rgb, fAlphaFromTexture);
|
|
}
|
|
}
|