diff --git a/shader_test.go b/shader_test.go
index e1d63ff86..718f714b1 100644
--- a/shader_test.go
+++ b/shader_test.go
@@ -469,7 +469,11 @@ func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
t.Fatal(err)
}
- dst := ebiten.NewImage(w, h)
+ // Make the destination image without a text atlas to get reliable results.
+ // A managed image can be on a texture atlas and it is not predictable where the pixels are.
+ dstOp := &ebiten.NewImageOptions{}
+ dstOp.Unmanaged = true
+ dst := ebiten.NewImageWithOptions(image.Rect(0, 0, w, h), dstOp)
src := ebiten.NewImage(w, h)
pix := make([]byte, 4*w*h)
for j := 0; j < h; j++ {
@@ -527,7 +531,11 @@ func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
t.Fatal(err)
}
- dst := ebiten.NewImage(w, h)
+ // Make the destination image without a text atlas to get reliable results.
+ // A managed image can be on a texture atlas and it is not predictable where the pixels are.
+ dstOp := &ebiten.NewImageOptions{}
+ dstOp.Unmanaged = true
+ dst := ebiten.NewImageWithOptions(image.Rect(0, 0, w, h), dstOp)
src := ebiten.NewImage(w, h)
pix := make([]byte, 4*w*h)
for j := 0; j < h; j++ {
Ebitengine Version
62e08e735665709c4e1dde205a2a4539e721be77
Operating System
Go Version (
go version
)go version go1.20 darwin/amd64
What steps will reproduce the problem?
Apply this patch and run the tests
What is the expected result?
The tests pass
What happens instead?
The tests fail:
Anything else you feel useful to add?
No response