mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
parent
239f9de2ca
commit
7b6f726729
@ -281,12 +281,15 @@ func (c *context) drawGame(graphicsDriver graphicsdriver.Graphics) {
|
|||||||
|
|
||||||
dstWidth, dstHeight := c.screen.width, c.screen.height
|
dstWidth, dstHeight := c.screen.width, c.screen.height
|
||||||
srcWidth, srcHeight := c.offscreen.width, c.offscreen.height
|
srcWidth, srcHeight := c.offscreen.width, c.offscreen.height
|
||||||
uniforms := shader.ConvertUniforms(map[string]interface{}{
|
var uniforms [][]float32
|
||||||
"Scale": []float32{
|
if shader == c.screenShader {
|
||||||
float32(dstWidth) / float32(srcWidth),
|
uniforms = shader.ConvertUniforms(map[string]interface{}{
|
||||||
float32(dstHeight) / float32(srcHeight),
|
"Scale": []float32{
|
||||||
},
|
float32(dstWidth) / float32(srcWidth),
|
||||||
})
|
float32(dstHeight) / float32(srcHeight),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
c.screen.DrawTriangles(srcs, vs, is, affine.ColorMIdentity{}, graphicsdriver.CompositeModeCopy, graphicsdriver.FilterNearest, graphicsdriver.AddressUnsafe, dstRegion, graphicsdriver.Region{}, [graphics.ShaderImageCount - 1][2]float32{}, shader, uniforms, false, true)
|
c.screen.DrawTriangles(srcs, vs, is, affine.ColorMIdentity{}, graphicsdriver.CompositeModeCopy, graphicsdriver.FilterNearest, graphicsdriver.AddressUnsafe, dstRegion, graphicsdriver.Region{}, [graphics.ShaderImageCount - 1][2]float32{}, shader, uniforms, false, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user