mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
internal/graphicsdriver/directx: refactoring
This commit is contained in:
parent
800be4f772
commit
e4efbfd1f1
@ -289,11 +289,11 @@ func adjustUniforms(uniformTypes []shaderir.Type, uniformOffsets []int, uniforms
|
|||||||
u := uniforms[idx+4*j : idx+4*(j+1)]
|
u := uniforms[idx+4*j : idx+4*(j+1)]
|
||||||
fs = append(fs,
|
fs = append(fs,
|
||||||
u[0], u[2], 0, 0,
|
u[0], u[2], 0, 0,
|
||||||
u[1], u[3], 0, 0,
|
u[1], u[3],
|
||||||
)
|
)
|
||||||
}
|
if j < typ.Length-1 {
|
||||||
if typ.Length > 0 {
|
fs = append(fs, 0, 0)
|
||||||
fs = fs[:len(fs)-2]
|
}
|
||||||
}
|
}
|
||||||
case shaderir.Mat3:
|
case shaderir.Mat3:
|
||||||
for j := 0; j < typ.Length; j++ {
|
for j := 0; j < typ.Length; j++ {
|
||||||
@ -301,11 +301,11 @@ func adjustUniforms(uniformTypes []shaderir.Type, uniformOffsets []int, uniforms
|
|||||||
fs = append(fs,
|
fs = append(fs,
|
||||||
u[0], u[3], u[6], 0,
|
u[0], u[3], u[6], 0,
|
||||||
u[1], u[4], u[7], 0,
|
u[1], u[4], u[7], 0,
|
||||||
u[2], u[5], u[8], 0,
|
u[2], u[5], u[8],
|
||||||
)
|
)
|
||||||
}
|
if j < typ.Length-1 {
|
||||||
if typ.Length > 0 {
|
fs = append(fs, 0)
|
||||||
fs = fs[:len(fs)-1]
|
}
|
||||||
}
|
}
|
||||||
case shaderir.Mat4:
|
case shaderir.Mat4:
|
||||||
for j := 0; j < typ.Length; j++ {
|
for j := 0; j < typ.Length; j++ {
|
||||||
|
Loading…
Reference in New Issue
Block a user