diff --git a/gfx/shaders/basic.frag b/gfx/shaders/basic.frag index 1c817c6..1dd5776 100644 --- a/gfx/shaders/basic.frag +++ b/gfx/shaders/basic.frag @@ -9,9 +9,6 @@ uniform sampler2D texture0; void main() { color = texture(texture0, TexCoord); - - // discard alpha - if (color.a < 1.0) discard; // gamma correction color = pow(color, vec4(0.4545)); diff --git a/main.go b/main.go index 40030a5..17aff07 100644 --- a/main.go +++ b/main.go @@ -39,19 +39,21 @@ func main() { glfw.WindowHint(glfw.ContextVersionMinor, 1) glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile) glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True) + glfw.WindowHint(glfw.Samples, 8) window, err := glfw.CreateWindow(defaultSize, defaultSize, "image widget", nil, nil) if err != nil { log.Fatalln("failed to create window:", err) } window.MakeContextCurrent() + helper.NewWindowMoveHandler(window) + helper.NewWindowCloseHandler(window, glfw.KeyEscape) if err := gl.Init(); err != nil { log.Fatalln("failed to init gl:", err) } - helper.NewWindowMoveHandler(window) - helper.NewWindowCloseHandler(window, glfw.KeyEscape) + gl.Enable(gl.MULTISAMPLE) if err := programLoop(window); err != nil { log.Fatalln("failed to exec program loop:", err)