Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / games / kart / src / main / rust / shaders / kart_gles.vert
kart_gles.vert18 lines · 564 BRaw
| 1 | #version 300 es |
| 2 | // Unlit vertex-color kart shader (GLES 3.0 port of kart.vert): the mesh |
| 3 | // carries the art (asphalt gray, grass green, per-kart box colors), so no |
| 4 | // textures and no samplers. The Vulkan `clip.y` flip is removed — OpenGL NDC |
| 5 | // Y already points up — so winding stays as authored (cull off either way). |
| 6 | layout(location = 0) in vec3 inPos; |
| 7 | layout(location = 1) in vec3 inColor; |
| 8 | |
| 9 | out vec3 vColor; |
| 10 | out vec3 vWorld; |
| 11 | |
| 12 | uniform mat4 uViewProj; |
| 13 | |
| 14 | void main() { |
| 15 | vColor = inColor; |
| 16 | vWorld = inPos; |
| 17 | gl_Position = uViewProj * vec4(inPos, 1.0); |
| 18 | } |