mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 04:22:05 +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
|
var lines []string
|
||||||
for i, t := range block.LocalVars {
|
for i, t := range block.LocalVars {
|
||||||
// The type is None e.g., when the variable is a for-loop counter.
|
// 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 {
|
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)))
|
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