program instancing_program(mat4 view_proj) //uniforms
{
// each '~' delimits separate vertex buffers
@vs(vec3 pos, vec4 color) ~ (vec3 normal) ~ instanced(mat4 transform)
{
return view_proj * transform * pos;
}
@ps(vec4 color, vec3 normal) //fragment shader inputs are deduced from vertex shader.
{
return color;
}
}
Last active
March 13, 2020 13:16
-
-
Save raizam/54e436d5d06cbe2314e622a579d54f10 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rewrite in rust when?