mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ebiten: Bug fix: zeroUniformValue panicked with vec2 or other vector/matrix types
This commit is contained in:
parent
06f4142ca0
commit
610ebbbab5
@ -225,7 +225,7 @@ func zeroUniformValue(name string, t shaderir.Type) driver.Uniform {
|
||||
return driver.Uniform{
|
||||
Float32: 0,
|
||||
}
|
||||
case shaderir.Array:
|
||||
case shaderir.Array, shaderir.Vec2, shaderir.Vec3, shaderir.Vec4, shaderir.Mat2, shaderir.Mat3, shaderir.Mat4:
|
||||
return driver.Uniform{
|
||||
Float32s: make([]float32, t.FloatNum()),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user