Hi people of the LWJGL-Forum

Okay, given this UBO:
layout (std140) uniform BaseRenderData {
mat4 viewMatrix;
mat4 projectionMatrix;
vec3 camPosition;
float cameraAngleVertical;
float cameraAngleHorizontal;
};
I would expect to fill it using the following code:
//'buffer' is a 'FloatBuffer', using only floats here
buffer.rewind();
//send over matrices data (matrices are org.joml.Matrix4f-objects):
viewMatrix.get(buffer);
bufferToPutMatricesIn.position( 16 );
projectionMatrix.get(buffer);
bufferToPutMatricesIn.position( 32 );
//send over camera data, all of these members are floats:
buffer.put(camera.position.x);
buffer.put(camera.position.y);
buffer.put(camera.position.z);
buffer.put(0.f); //!!!!!!!
buffer.put(camera.verticalAngle);
buffer.put(camera.horizontalAngle);
Now, I have marked a specific line with
!!!!!!!, which is giving me a headache. Since my UBO is of
std140 layout, the
vec3 I am using here should have the size of a
vec4, hence I need to add this "dead" data.
However, keeping this line in the code will break the shader, with the vertical angle's value becoming the horizontal one and and horizontal one not being applied. Aka, it is an offset-problem. Question is **WHY?** Removing the line makes everything behave correctly, which is a violation of OpenGL spec as far as I understand it.
I am not ready to believe that my device's driver has a bug that severe. Anybody got an idea?
For reference, I am using LWJGL 3.2.3.