mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphicscommand: Bug fix: Needed to adjust vertices when highp is not available
Fixes #962
This commit is contained in:
parent
15dc4bc647
commit
e578b0bd49
@ -230,6 +230,19 @@ func (q *commandQueue) Flush() {
|
||||
vs[i*graphics.VertexFloatNum+6] -= 1.0 / s.width * texelAdjustmentFactor
|
||||
vs[i*graphics.VertexFloatNum+7] -= 1.0 / s.height * texelAdjustmentFactor
|
||||
}
|
||||
} else {
|
||||
n := q.nvertices / graphics.VertexFloatNum
|
||||
for i := 0; i < n; i++ {
|
||||
s := q.srcSizes[i]
|
||||
|
||||
// Convert pixels to texels.
|
||||
vs[i*graphics.VertexFloatNum+2] /= s.width
|
||||
vs[i*graphics.VertexFloatNum+3] /= s.height
|
||||
vs[i*graphics.VertexFloatNum+4] /= s.width
|
||||
vs[i*graphics.VertexFloatNum+5] /= s.height
|
||||
vs[i*graphics.VertexFloatNum+6] /= s.width
|
||||
vs[i*graphics.VertexFloatNum+7] /= s.height
|
||||
}
|
||||
}
|
||||
|
||||
theGraphicsDriver.Begin()
|
||||
|
Loading…
Reference in New Issue
Block a user