mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58: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
|
||||
srcWidth, srcHeight := c.offscreen.width, c.offscreen.height
|
||||
uniforms := shader.ConvertUniforms(map[string]interface{}{
|
||||
var uniforms [][]float32
|
||||
if shader == c.screenShader {
|
||||
uniforms = shader.ConvertUniforms(map[string]interface{}{
|
||||
"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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user