mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-07-04 20:23:07 +02:00
17 lines
352 B
GLSL
17 lines
352 B
GLSL
// In your vertex shader:
|
|
// ======================
|
|
#version 330 core
|
|
layout (location = 0) in vec3 aPos;
|
|
layout (location = 1) in vec3 aColor;
|
|
|
|
out vec3 ourColor;
|
|
|
|
uniform float xOffset;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(aPos.x + xOffset, aPos.y, aPos.z, 1.0); // add the xOffset to the x position of the vertex position
|
|
ourColor = aColor;
|
|
}
|
|
|