mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-23 17:32:02 +01:00
ebiten: bug fix: wrong interpolation in the screen shader
This commit is contained in:
parent
0e1b73f94f
commit
9ad9bc9ed9
@ -42,7 +42,7 @@ func Fragment(position vec4, texCoord vec2, color vec4) vec4 {
|
||||
c3 := imageSrc0UnsafeAt(p1)
|
||||
|
||||
// p is the p1 value in one pixel assuming that the pixel's upper-left is (0, 0) and the lower-right is (1, 1).
|
||||
rate := clamp(fract(p1), 0, 1)
|
||||
rate := clamp(fract(p1)*scale, 0, 1)
|
||||
return mix(mix(c0, c1, rate.x), mix(c2, c3, rate.x), rate.y)
|
||||
}
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user