mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
shaderir: Do not use () for the callees
This commit is contained in:
parent
7b960a2df4
commit
7937b302e3
@ -254,7 +254,8 @@ func (p *Program) glslBlock(b *Block, level int, localVarIndex int) []string {
|
||||
for _, exp := range e.Exprs[1:] {
|
||||
args = append(args, glslExpr(&exp))
|
||||
}
|
||||
return fmt.Sprintf("(%s)(%s)", glslExpr(&e.Exprs[0]), strings.Join(args, ", "))
|
||||
// Using parentheses at the callee is illegal.
|
||||
return fmt.Sprintf("%s(%s)", glslExpr(&e.Exprs[0]), strings.Join(args, ", "))
|
||||
case FieldSelector:
|
||||
return fmt.Sprintf("(%s).%s", glslExpr(&e.Exprs[0]), glslExpr(&e.Exprs[1]))
|
||||
case Index:
|
||||
|
@ -456,12 +456,12 @@ varying vec3 V0;`,
|
||||
},
|
||||
},
|
||||
GlslVS: `void F0(in float l0, in float l1, out vec2 l2) {
|
||||
(F1)();
|
||||
l2 = (F2)(l0, l1);
|
||||
F1();
|
||||
l2 = F2(l0, l1);
|
||||
}`,
|
||||
GlslFS: `void F0(in float l0, in float l1, out vec2 l2) {
|
||||
(F1)();
|
||||
l2 = (F2)(l0, l1);
|
||||
F1();
|
||||
l2 = F2(l0, l1);
|
||||
}`,
|
||||
},
|
||||
{
|
||||
@ -492,10 +492,10 @@ varying vec3 V0;`,
|
||||
},
|
||||
},
|
||||
GlslVS: `void F0(in float l0, in float l1, out float l2) {
|
||||
l2 = (min)(l0, l1);
|
||||
l2 = min(l0, l1);
|
||||
}`,
|
||||
GlslFS: `void F0(in float l0, in float l1, out float l2) {
|
||||
l2 = (min)(l0, l1);
|
||||
l2 = min(l0, l1);
|
||||
}`,
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user