mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
20 lines
349 B
Plaintext
20 lines
349 B
Plaintext
// you can write GLSL code directly in here
|
|
|
|
#if USE_ALPHA_TEST
|
|
uniform ALPHA_TEST_DATA {
|
|
float alphaThreshold;
|
|
};
|
|
#endif
|
|
|
|
void ALPHA_TEST (in vec4 color) {
|
|
#if USE_ALPHA_TEST
|
|
if (color.a < alphaThreshold) discard;
|
|
#endif
|
|
}
|
|
|
|
void ALPHA_TEST (in float alpha) {
|
|
#if USE_ALPHA_TEST
|
|
if (alpha < alphaThreshold) discard;
|
|
#endif
|
|
}
|