2024-02-04 23:39:37 +01:00
|
|
|
#version 430 core
|
|
|
|
layout (location = 0) in vec3 vertex;
|
|
|
|
layout (location = 1) in vec2 texCoords;
|
|
|
|
|
|
|
|
out vec2 TexCoords;
|
|
|
|
out vec4 ParticleColor;
|
|
|
|
|
|
|
|
uniform mat4 transformation;
|
|
|
|
uniform vec3 position;
|
|
|
|
uniform vec4 color;
|
|
|
|
|
|
|
|
uniform vec3 cameraUp;
|
|
|
|
uniform vec3 cameraSide;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
float scale = 1.0f;
|
|
|
|
TexCoords = texCoords;
|
|
|
|
ParticleColor = color;
|
|
|
|
vec3 worldspacePos = cameraSide*vertex.x + cameraUp*vertex.y;
|
|
|
|
gl_Position = transformation * vec4((worldspacePos.xyz * scale) + position, 1.0);
|
|
|
|
}
|