24 lines
546 B
GLSL
24 lines
546 B
GLSL
#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 float engPow;
|
|
|
|
uniform vec3 cameraUp;
|
|
uniform vec3 cameraSide;
|
|
|
|
void main()
|
|
{
|
|
float scale = 0.05f + engPow/20;
|
|
TexCoords = texCoords;
|
|
ParticleColor = color;
|
|
vec3 worldspacePos = cameraSide*vertex.x + cameraUp*vertex.y;
|
|
gl_Position = transformation * vec4((worldspacePos.xyz * scale) + position, 1.0);
|
|
} |