From bab05874cd8d23ef128c75f2a879fc99da35d346 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 1 Aug 2020 19:04:10 +0900 Subject: [PATCH] shaderir: Remove unnecessary empty lines --- internal/shaderir/glsl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/shaderir/glsl.go b/internal/shaderir/glsl.go index 4ac120b16..e6c233ccc 100644 --- a/internal/shaderir/glsl.go +++ b/internal/shaderir/glsl.go @@ -128,10 +128,10 @@ func (p *Program) Glsl() (vertexShader, fragmentShader string) { for i, t := range p.Varyings { fslines = append(fslines, fmt.Sprintf("varying %s;", p.glslVarDecl(&t, fmt.Sprintf("V%d", i)))) } + if len(fslines) > 0 { + fslines = append(fslines, "") + } for _, f := range p.Funcs { - if len(fslines) > 0 { - fslines = append(fslines, "") - } fslines = append(fslines, p.glslFunc(&f, true)...) } for _, f := range p.Funcs {