Шейдер с учетом mvp

This commit is contained in:
2022-12-15 13:45:11 +03:00
parent 795aac516d
commit e64d62b56f
6 changed files with 25 additions and 9 deletions

View File

@@ -2,8 +2,10 @@
layout(location = 0) in vec3 pos;
uniform mat4 vp;
uniform mat4 model;
void main()
{
gl_Position.xyz = pos;
gl_Position.w = 1.0;
gl_Position = vp * model * vec4(pos, 1.0);
}