shaderir: Add StructMember

This commit is contained in:
Hajime Hoshi 2020-05-17 02:46:02 +09:00
parent 8a6140a92f
commit dbbe4ee09c
2 changed files with 3 additions and 0 deletions

View File

@ -193,6 +193,8 @@ func (p *Program) glslBlock(b *Block, level int, localVarIndex int) []string {
switch e.Variable.Type {
case Uniform:
return fmt.Sprintf("U%d", e.Variable.Index)
case StructMember:
return fmt.Sprintf("M%d", e.Variable.Index)
case Local:
idx := e.Variable.Index
switch b {

View File

@ -119,6 +119,7 @@ type VariableType int
const (
Uniform VariableType = iota
StructMember
Local
)