Replace explicit matrix uniforms with single ubo

This commit is contained in:
jgk
2021-06-24 17:58:15 +02:00
parent 7ab932db93
commit 97598bc171
26 changed files with 39 additions and 174 deletions
+2 -4
View File
@@ -1,12 +1,10 @@
#version 430 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec3 texPos;
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
out vec3 vTexPos;
uniform mat4 worldMat;
void main()
{
gl_Position = worldMat * vec4(pos,1.0) ;
gl_Position = theMat * vec4(pos,1.0) ;
vTexPos = texPos;
}