Files
cocos4/editor/assets/chunks/alpha-test.chunk
T
JoneLau 351b6480e4 add image stencil in mask (#7598)
* add image stencil in mask

* update
2020-10-28 12:13:53 +08:00

21 lines
354 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
}