|
@@ -19,11 +19,21 @@ class ShaderParam extends ShaderNode {
|
|
|
if (this.variable.type == TSampler2D) {
|
|
|
qual.push(Sampler(this.variable.name));
|
|
|
}
|
|
|
- var inVar : TVar = {name: this.variable.name, id: getNewIdFn(), type: this.variable.type, kind: Param, qualifiers: qual};
|
|
|
- var output : TVar = {name: "output", id: getNewIdFn(), type: this.variable.type, kind: Local, qualifiers: []};
|
|
|
- var finalExpr : TExpr = {e: TBinop(OpAssign, {e:TVar(output), p:pos, t:output.type}, {e: TVar(inVar), p: pos, t: output.type}), p: pos, t: output.type};
|
|
|
|
|
|
- return {expr: finalExpr, inVars: [{v:inVar, internal: true, isDynamic: false}], outVars:[{v:output, internal: false, isDynamic: false}], externVars: [], inits: []};
|
|
|
+ //if (this.variable.type != TSampler2D) {
|
|
|
+ var inVar : TVar = {name: this.variable.name, id: getNewIdFn(), type: this.variable.type, kind: Param, qualifiers: qual};
|
|
|
+ var output : TVar = {name: "output", id: getNewIdFn(), type: this.variable.type, kind: Local, qualifiers: []};
|
|
|
+ var finalExpr : TExpr = {e: TBinop(OpAssign, {e:TVar(output), p:pos, t:output.type}, {e: TVar(inVar), p: pos, t: output.type}), p: pos, t: output.type};
|
|
|
+
|
|
|
+ return {expr: finalExpr, inVars: [{v:inVar, internal: true, isDynamic: false}], outVars:[{v:output, internal: false, isDynamic: false}], externVars: [], inits: []};
|
|
|
+ //}
|
|
|
+ //else {
|
|
|
+ //var samplerVar : TVar = {name: this.variable.name, id: getNewIdFn(), type: this.variable.type, kind: Param, qualifiers: qual};
|
|
|
+ //var cuv = ShaderInput.availableInputs.get("calculatedUV");
|
|
|
+ //var uv : TVar = {name: cuv.v.name, id: getNewIdFn(), type: cuv.v.type, kind: cuv.v.kind, qualifiers: []};
|
|
|
+ //var output : TVar = {name: "output", id: getNewIdFn(), type: this.variable.type, kind: Local, qualifiers: []};
|
|
|
+ // return
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
public var variable : TVar;
|