forked from tsuki/openroller
Initial public source release
Split reusable rendering and format support into vectorail-core and vectorail-gc.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec2 aOffset; // Смещение углов квадрата
|
||||
layout (location = 2) in float aLife;
|
||||
|
||||
uniform mat4 uProjection;
|
||||
uniform mat4 uView;
|
||||
|
||||
out float vLife;
|
||||
|
||||
void main() {
|
||||
vLife = aLife;
|
||||
vec4 viewPos = uView * vec4(aPos, 1.0);
|
||||
// Billboard: квадрат всегда смотрит на камеру
|
||||
viewPos.xy += aOffset * aLife * 0.5;
|
||||
gl_Position = uProjection * viewPos;
|
||||
}
|
||||
Reference in New Issue
Block a user