mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
internal/shaderir/msl: refactoring
This commit is contained in:
parent
5715539a0f
commit
98e2d86ea3
@ -303,9 +303,9 @@ func localVariableName(p *shaderir.Program, topBlock *shaderir.Block, idx int) s
|
|||||||
nv := len(p.Varyings)
|
nv := len(p.Varyings)
|
||||||
switch {
|
switch {
|
||||||
case idx == 0:
|
case idx == 0:
|
||||||
return fmt.Sprintf("varyings.Position")
|
return fmt.Sprintf("%s.Position", vertexOut)
|
||||||
case idx < nv+1:
|
case idx < nv+1:
|
||||||
return fmt.Sprintf("varyings.M%d", idx-1)
|
return fmt.Sprintf("%s.M%d", vertexOut, idx-1)
|
||||||
case idx == nv+1:
|
case idx == nv+1:
|
||||||
return fragmentOut
|
return fragmentOut
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user