diff --git a/internal/shaderir/glsl.go b/internal/shaderir/glsl.go index 6874a0894..f24657ed7 100644 --- a/internal/shaderir/glsl.go +++ b/internal/shaderir/glsl.go @@ -86,8 +86,6 @@ func (p *Program) glslType(t *Type) string { switch t.Main { case None: return "void" - case Image2D: - panic("not implemented") case Array: panic("not implemented") case Struct: @@ -101,8 +99,6 @@ func (p *Program) glslVarDecl(t *Type, varname string) string { switch t.Main { case None: return "?(none)" - case Image2D: - panic("not implemented") case Array: panic("not implemented") case Struct: diff --git a/internal/shaderir/type.go b/internal/shaderir/type.go index c46efaa09..3e3e324f5 100644 --- a/internal/shaderir/type.go +++ b/internal/shaderir/type.go @@ -47,8 +47,8 @@ func (t *Type) serialize() string { return "mat3" case Mat4: return "mat4" - case Image2D: - return "image2d" + case Sampler2D: + return "sampler2D" case Array: return fmt.Sprintf("%s[%d]", t.Sub[0].serialize(), t.Length) case Struct: @@ -78,7 +78,7 @@ const ( Mat2 Mat3 Mat4 - Image2D + Sampler2D Array Struct ) @@ -105,8 +105,8 @@ func (t BasicType) Glsl() string { return "mat3" case Mat4: return "mat4" - case Image2D: - return "?(image2d)" + case Sampler2D: + return "sampler2D" case Array: // First-class array is not available on GLSL ES 2. return "?(array)"