Files
cocos4/editor/assets/chunks/alpha-test.chunk
T
2021-02-22 15:56:30 +08:00

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
}