diff --git a/main.go b/main.go index feeea0b..6bab5a8 100644 --- a/main.go +++ b/main.go @@ -50,8 +50,8 @@ func main() { t0 := time.Now() rng := rand.New(rand.NewSource(0)) - //imageField := NewImageField("/home/d/Dropbox/art/passage/data/david.png") - imageField := NewImageField("/home/d/Dropbox/art/data/moses_statue.jpg") + imageField := NewImageField("/home/d/Dropbox/art/data/david.png") + //imageField := NewImageField("/home/d/Dropbox/art/data/moses_statue.jpg") field := &TranslateField { x: -float32(sourceWidth / 2.0), diff --git a/sketch.go b/sketch.go index 3cf164b..ea229ff 100644 --- a/sketch.go +++ b/sketch.go @@ -150,6 +150,9 @@ func (s *Sketch) Draw(ctx *RenderCtx) { } rl.EndTextureMode() + rl.GenTextureMipmaps(&s.composite.Texture) + rl.SetTextureFilter(s.composite.Texture, rl.FilterTrilinear) + outputRect := s.calcOutputRectKeepingAspectRatio(ctx) rl.DrawTexturePro(s.composite.Texture, viewport, outputRect, rl.Vector2{}, 0, rl.White)