mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 12:18:55 +01:00
14 lines
315 B
Go
14 lines
315 B
Go
|
package main
|
||
|
|
||
|
func Vertex(position vec2, texCoord vec2, color vec4) (position vec4, texCoord vec2, color vec4) {
|
||
|
projectionMatrix := mat4(
|
||
|
2/ScreenSize.x, 0, 0, 0,
|
||
|
0, 2/ScreenSize.y, 0, 0,
|
||
|
0, 0, 1, 0,
|
||
|
-1, -1, 0, 1,
|
||
|
)
|
||
|
return projectionMatrix * vec4(position, 0, 1), texCoord, color
|
||
|
}
|
||
|
|
||
|
var ScreenSize vec2
|