|
@@ -99,10 +99,10 @@ public class FuncContext
|
|
if (!HasContext && r is Float1 firstFloat && g is Float1 secondFloat && b is Float1 thirdFloat && a is Float1 fourthFloat)
|
|
if (!HasContext && r is Float1 firstFloat && g is Float1 secondFloat && b is Float1 thirdFloat && a is Float1 fourthFloat)
|
|
{
|
|
{
|
|
Half4 constantHalf4 = new Half4("");
|
|
Half4 constantHalf4 = new Half4("");
|
|
- byte rByte = firstFloat.FullSizeByteConstant;
|
|
|
|
- byte gByte = secondFloat.FullSizeByteConstant;
|
|
|
|
- byte bByte = thirdFloat.FullSizeByteConstant;
|
|
|
|
- byte aByte = fourthFloat.FullSizeByteConstant;
|
|
|
|
|
|
+ byte rByte = firstFloat.AsConstantColorByte();
|
|
|
|
+ byte gByte = secondFloat.AsConstantColorByte();
|
|
|
|
+ byte bByte = thirdFloat.AsConstantColorByte();
|
|
|
|
+ byte aByte = fourthFloat.AsConstantColorByte();
|
|
constantHalf4.ConstantValue = new Color(rByte, gByte, bByte, aByte);
|
|
constantHalf4.ConstantValue = new Color(rByte, gByte, bByte, aByte);
|
|
return constantHalf4;
|
|
return constantHalf4;
|
|
}
|
|
}
|
|
@@ -118,7 +118,7 @@ public class FuncContext
|
|
var hValue = firstFloat.ConstantValue * 360;
|
|
var hValue = firstFloat.ConstantValue * 360;
|
|
var sValue = secondFloat.ConstantValue * 100;
|
|
var sValue = secondFloat.ConstantValue * 100;
|
|
var vValue = thirdFloat.ConstantValue * 100;
|
|
var vValue = thirdFloat.ConstantValue * 100;
|
|
- byte aByte = fourthFloat.FullSizeByteConstant;
|
|
|
|
|
|
+ byte aByte = fourthFloat.AsConstantColorByte();
|
|
constantHalf4.ConstantValue = Color.FromHsv((float)hValue, (float)sValue, (float)vValue, aByte);
|
|
constantHalf4.ConstantValue = Color.FromHsv((float)hValue, (float)sValue, (float)vValue, aByte);
|
|
return constantHalf4;
|
|
return constantHalf4;
|
|
}
|
|
}
|
|
@@ -134,7 +134,7 @@ public class FuncContext
|
|
var hValue = firstFloat.ConstantValue * 360;
|
|
var hValue = firstFloat.ConstantValue * 360;
|
|
var sValue = secondFloat.ConstantValue * 100;
|
|
var sValue = secondFloat.ConstantValue * 100;
|
|
var lValue = thirdFloat.ConstantValue * 100;
|
|
var lValue = thirdFloat.ConstantValue * 100;
|
|
- byte aByte = fourthFloat.FullSizeByteConstant;
|
|
|
|
|
|
+ byte aByte = fourthFloat.AsConstantColorByte();
|
|
constantHalf4.ConstantValue = Color.FromHsl((float)hValue, (float)sValue, (float)lValue, aByte);
|
|
constantHalf4.ConstantValue = Color.FromHsl((float)hValue, (float)sValue, (float)lValue, aByte);
|
|
return constantHalf4;
|
|
return constantHalf4;
|
|
}
|
|
}
|