mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-08 09:43:22 +08:00
Get the 0.full_source folder back in game directory and comment out game compile, not ideal, but needs to be reverted for now to not break code/book links, will look into better fix.
This commit is contained in:
17
src/7.in_practice/3.2d_game/0.full_source/particle.vs
Normal file
17
src/7.in_practice/3.2d_game/0.full_source/particle.vs
Normal file
@@ -0,0 +1,17 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec4 vertex; // <vec2 position, vec2 texCoords>
|
||||
|
||||
out vec2 TexCoords;
|
||||
out vec4 ParticleColor;
|
||||
|
||||
uniform mat4 projection;
|
||||
uniform vec2 offset;
|
||||
uniform vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
float scale = 10.0f;
|
||||
TexCoords = vertex.zw;
|
||||
ParticleColor = color;
|
||||
gl_Position = projection * vec4((vertex.xy * scale) + offset, 0.0, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user