2017-05-19 22:14:08 +00:00
|
|
|
#version 310 es
|
|
|
|
|
|
|
|
layout(std140) uniform UBO
|
|
|
|
{
|
|
|
|
uniform mat4 uMVP;
|
|
|
|
uniform vec3 rotDeg;
|
|
|
|
uniform vec3 rotRad;
|
|
|
|
uniform ivec2 bits;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout(location = 0) in vec4 aVertex;
|
|
|
|
layout(location = 1) in vec3 aNormal;
|
|
|
|
|
2017-06-21 07:39:08 +00:00
|
|
|
layout(location = 0) out vec3 vNormal;
|
|
|
|
layout(location = 1) out vec3 vRotDeg;
|
|
|
|
layout(location = 2) out vec3 vRotRad;
|
|
|
|
layout(location = 3) out ivec2 vLSB;
|
|
|
|
layout(location = 4) out ivec2 vMSB;
|
2017-05-19 22:14:08 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_Position = inverse(uMVP) * aVertex;
|
|
|
|
vNormal = aNormal;
|
|
|
|
vRotDeg = degrees(rotRad);
|
|
|
|
vRotRad = radians(rotDeg);
|
|
|
|
vLSB = findLSB(bits);
|
|
|
|
vMSB = findMSB(bits);
|
|
|
|
}
|