mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
Set max dst images to 8 + some wording
This commit is contained in:
parent
75b6e1fa6d
commit
2faf8a551d
@ -31,7 +31,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
dsts = [4]*ebiten.Image{
|
dsts = [8]*ebiten.Image{
|
||||||
/*ebiten.NewImage(dstSize, dstSize),
|
/*ebiten.NewImage(dstSize, dstSize),
|
||||||
ebiten.NewImage(dstSize, dstSize),
|
ebiten.NewImage(dstSize, dstSize),
|
||||||
ebiten.NewImage(dstSize, dstSize),
|
ebiten.NewImage(dstSize, dstSize),
|
||||||
|
@ -590,7 +590,7 @@ func drawTrianglesMRT(dsts [graphics.ShaderDstImageCount]*Image, srcs [graphics.
|
|||||||
// i and a source image might share the same atlas even though i != src.
|
// i and a source image might share the same atlas even though i != src.
|
||||||
for _, dst := range dsts {
|
for _, dst := range dsts {
|
||||||
if src != nil && dst != nil && dst.backend.image == src.backend.image {
|
if src != nil && dst != nil && dst.backend.image == src.backend.image {
|
||||||
panic("atlas: Image.DrawTriangles: source must be different from the receiver")
|
panic("atlas: DrawTrianglesMRT: source must be different from the destination images")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ func DrawTrianglesMRT(dsts [graphics.ShaderDstImageCount]*Image, srcs [graphics.
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if dst == src {
|
if dst == src {
|
||||||
panic("buffered: DrawTrianglesMRT: source images must be different from the destination")
|
panic("buffered: DrawTrianglesMRT: source images must be different from the destination images")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if src != nil {
|
if src != nil {
|
||||||
|
@ -16,7 +16,11 @@ package graphics
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
ShaderSrcImageCount = 4
|
ShaderSrcImageCount = 4
|
||||||
ShaderDstImageCount = 4
|
// The minimum guaranteed value for the number of target seems to be 8
|
||||||
|
// OpenGL(8): https://www.khronos.org/opengl/wiki/Framebuffer_Object#Framebuffer_Object_Structure
|
||||||
|
// DirectX11(8): https://learn.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-output-merger-stage#multiple-rendertargets-overview
|
||||||
|
// Metal(8): Page 7 of 15: https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
|
||||||
|
ShaderDstImageCount = 8
|
||||||
|
|
||||||
// PreservedUniformVariablesCount represents the number of preserved uniform variables.
|
// PreservedUniformVariablesCount represents the number of preserved uniform variables.
|
||||||
// Any shaders in Ebitengine must have these uniform variables.
|
// Any shaders in Ebitengine must have these uniform variables.
|
||||||
|
Loading…
Reference in New Issue
Block a user