forked from StudioInfinity/dyna3

This makes the module tree more reflective of module use patterns. In
particular, it restores the condition that every top-level module is
used in top-level code, which was broken by the addition of the
`test_assembly_chooser` module in commit 91e4e1f
.
24 lines
No EOL
461 B
GLSL
24 lines
No EOL
461 B
GLSL
#version 300 es
|
|
|
|
in vec4 position;
|
|
in vec4 color;
|
|
in float highlight;
|
|
in float selected;
|
|
|
|
out vec4 point_color;
|
|
out float point_highlight;
|
|
out float total_radius;
|
|
|
|
// camera
|
|
const float focal_slope = 0.3;
|
|
|
|
void main() {
|
|
total_radius = 5. + 0.5*selected;
|
|
|
|
float depth = -focal_slope * position.z;
|
|
gl_Position = vec4(position.xy / depth, 0., 1.);
|
|
gl_PointSize = 2.*total_radius;
|
|
|
|
point_color = color;
|
|
point_highlight = highlight;
|
|
} |