Replace shader "if" instruction to "step"

This commit is contained in:
2017-08-06 02:07:09 +07:00
parent 17a7a1f10e
commit 9f7f0e5a2b
5 changed files with 6 additions and 22 deletions

View File

@@ -378,7 +378,7 @@ namespace FTEditor.Postprocessors {
var bitmap = inst != null
? FindBitmapFromAssetData(data, inst.Bitmap)
: null;
if ( bitmap != null && IsVisibleInstance(inst) ) {
if ( bitmap != null ) {
var width = bitmap.RealWidth / 20.0f;
var height = bitmap.RealHeight / 20.0f;
@@ -491,11 +491,6 @@ namespace FTEditor.Postprocessors {
return null;
}
static bool IsVisibleInstance(SwfInstanceData inst) {
var result_color = inst.ColorTrans.ApplyToColor(Color.white);
return result_color.a >= 0.01f;
}
// ---------------------------------------------------------------------
//
// UpdateAssetClips

View File

@@ -154,14 +154,6 @@ namespace FTEditor {
public SwfVec4Data mulColor;
public SwfVec4Data addColor;
public Color ApplyToColor(Color color) {
return new Color(
Mathf.Clamp01(color.r * mulColor.x + addColor.x),
Mathf.Clamp01(color.g * mulColor.y + addColor.y),
Mathf.Clamp01(color.b * mulColor.z + addColor.z),
Mathf.Clamp01(color.a * mulColor.w + addColor.w));
}
public static SwfColorTransData identity {
get {
return new SwfColorTransData{