Initial public source release
Split reusable rendering and format support into vectorail-core and vectorail-gc.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#version 450 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in float aSide;
|
||||
layout (location = 2) in vec3 aRight;
|
||||
layout (location = 3) in float aTimeMs;
|
||||
|
||||
uniform mat4 uProjection;
|
||||
uniform mat4 uView;
|
||||
uniform float uWidth;
|
||||
|
||||
out float vSide;
|
||||
out float vDist;
|
||||
out float vTrackTimeMs;
|
||||
|
||||
void main() {
|
||||
vSide = aSide;
|
||||
vTrackTimeMs = aTimeMs;
|
||||
vec3 finalPos = aPos + aRight * aSide * uWidth;
|
||||
|
||||
// Считаем позицию в пространстве камеры
|
||||
vec4 viewPos = uView * vec4(finalPos, 1.0);
|
||||
vDist = -viewPos.z; // Глубина (дистанция от камеры)
|
||||
|
||||
gl_Position = uProjection * viewPos;
|
||||
}
|
||||
Reference in New Issue
Block a user