mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-16 22:19:31 +07:00
remove external alpha IF from shaders
This commit is contained in:
@@ -348,13 +348,14 @@ namespace FTRuntime {
|
||||
var sprite = clip ? clip.Sprite : null;
|
||||
var atlas = sprite && sprite.texture ? sprite.texture : Texture2D.whiteTexture;
|
||||
var atlasA = sprite ? sprite.associatedAlphaSplitTexture : null;
|
||||
if ( atlas ) {
|
||||
_curPropBlock.SetTexture("_MainTex", atlas);
|
||||
}
|
||||
_curPropBlock.SetTexture(
|
||||
"_MainTex",
|
||||
atlas ? atlas : Texture2D.whiteTexture);
|
||||
if ( atlasA ) {
|
||||
_curPropBlock.SetTexture("_AlphaTex", atlasA);
|
||||
_curPropBlock.SetFloat("_ExternalAlpha", 1.0f);
|
||||
} else {
|
||||
_curPropBlock.SetTexture("_AlphaTex", Texture2D.whiteTexture);
|
||||
_curPropBlock.SetFloat("_ExternalAlpha", 0.0f);
|
||||
}
|
||||
_meshRenderer.SetPropertyBlock(_curPropBlock);
|
||||
|
||||
Reference in New Issue
Block a user