mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-09 17:20:33 +08:00
10 lines
268 B
Plaintext
10 lines
268 B
Plaintext
// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
|
|
|
|
vec4 CCSampleWithAlphaSeparated(sampler2D tex, vec2 uv) {
|
|
#if CC_USE_EMBEDDED_ALPHA
|
|
return vec4(texture(tex, uv).rgb, texture(tex, uv + vec2(0.0, 0.5)).r);
|
|
#else
|
|
return texture(tex, uv);
|
|
#endif
|
|
}
|