mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
shader: Refactoring
This commit is contained in:
parent
0a0401e217
commit
1786be55f7
@ -321,8 +321,8 @@ func (c *compileContext) metalBlock(p *shaderir.Program, topBlock, block *shader
|
||||
var lines []string
|
||||
for i, t := range block.LocalVars {
|
||||
// The type is None e.g., when the variable is a for-loop counter.
|
||||
name := localVariableName(p, topBlock, block.LocalVarIndexOffset+i)
|
||||
if t.Main != shaderir.None {
|
||||
name := localVariableName(p, topBlock, block.LocalVarIndexOffset+i)
|
||||
lines = append(lines, fmt.Sprintf("%s%s = %s;", idt, c.metalVarDecl(p, &t, name, false, false), c.metalVarInit(p, &t)))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user