mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/shaderir: use parentheses for vector equal operators
This commit is contained in:
parent
9c5ba4b857
commit
b28b323920
@ -385,9 +385,9 @@ func (c *compileContext) block(p *shaderir.Program, topBlock, block *shaderir.Bl
|
||||
case shaderir.Binary:
|
||||
switch e.Op {
|
||||
case shaderir.VectorEqualOp:
|
||||
return fmt.Sprintf("all(%s == %s)", expr(&e.Exprs[0]), expr(&e.Exprs[1]))
|
||||
return fmt.Sprintf("all((%s) == (%s))", expr(&e.Exprs[0]), expr(&e.Exprs[1]))
|
||||
case shaderir.VectorNotEqualOp:
|
||||
return fmt.Sprintf("!all(%s == %s)", expr(&e.Exprs[0]), expr(&e.Exprs[1]))
|
||||
return fmt.Sprintf("!all((%s) == (%s))", expr(&e.Exprs[0]), expr(&e.Exprs[1]))
|
||||
case shaderir.MatrixMul:
|
||||
// If either is a matrix, use the mul function.
|
||||
// Swap the order of the lhs and the rhs since matrices are row-major in HLSL.
|
||||
|
Loading…
Reference in New Issue
Block a user