mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
-Restored an alpha scissor property in Material
This commit is contained in:
parent
8a4bce6ebd
commit
df573f5c3a
11 changed files with 119 additions and 51 deletions
|
|
@ -1523,6 +1523,10 @@ void main() {
|
|||
#endif
|
||||
|
||||
|
||||
#if defined(ALPHA_SCISSOR_USED)
|
||||
float alpha_scissor = 0.5;
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
|
||||
vec3 binormal = normalize(binormal_interp)*side;
|
||||
vec3 tangent = normalize(tangent_interp)*side;
|
||||
|
|
@ -1571,6 +1575,12 @@ FRAGMENT_SHADER_CODE
|
|||
}
|
||||
|
||||
|
||||
#if defined(ALPHA_SCISSOR_USED)
|
||||
if (alpha<alpha_scissor) {
|
||||
discard;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ENABLE_NORMALMAP)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue