mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 18:09:14 -07:00
Procedure: fix set attribute swizzle
This commit is contained in:
@@ -258,7 +258,7 @@ use namespace alternativa3d;
|
|||||||
throw new Error("Expression is too complex. Output used as source.");
|
throw new Error("Expression is too complex. Output used as source.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var maxSwizzle:uint = (aSwizzleLen > bSwizzleLen) ? aSwizzleLen : bSwizzleLen;
|
var maxSwizzle:uint;
|
||||||
if (numInputs <= 1) {
|
if (numInputs <= 1) {
|
||||||
maxSwizzle = getSwizzleLen(a);
|
maxSwizzle = getSwizzleLen(a);
|
||||||
} else {
|
} else {
|
||||||
@@ -293,7 +293,7 @@ use namespace alternativa3d;
|
|||||||
var operand:String;
|
var operand:String;
|
||||||
if (numOperands == 3) {
|
if (numOperands == 3) {
|
||||||
operand = operands[2];
|
operand = operands[2];
|
||||||
if (getSwizzleLen(operand) != 4 && getSwizzleLen(operand) != 1) {
|
if (getSwizzleLen(operand) != outputMaskLen && getSwizzleLen(operand) != 1) {
|
||||||
throw new Error("Expression differs in size with output " + output + ".");
|
throw new Error("Expression differs in size with output " + output + ".");
|
||||||
}
|
}
|
||||||
writeAGALExpression("mov " + output + " " + operand);
|
writeAGALExpression("mov " + output + " " + operand);
|
||||||
|
|||||||
Reference in New Issue
Block a user