mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 09:59:44 -05:00
Circular point renderable
This commit is contained in:
@@ -162,7 +162,6 @@ namespace openspace {
|
||||
glBlendEquation(GL_FUNC_ADD);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glEnable(GL_PROGRAM_POINT_SIZE); // Enable gl_PointSize in vertex
|
||||
glEnable(GL_POINT_SMOOTH);
|
||||
|
||||
glBindVertexArray(_vaoID);
|
||||
glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(_varray.size()));
|
||||
|
||||
@@ -37,6 +37,10 @@ Fragment getFragment() {
|
||||
frag.depth = vs_depthClipSpace;
|
||||
frag.gPosition = vs_positionViewSpace;
|
||||
|
||||
vec2 temp = gl_PointCoord - vec2(0.5);
|
||||
float f = dot(temp, temp);
|
||||
if (f>0.25) discard;
|
||||
|
||||
// There is no normal here
|
||||
frag.gNormal = vec4(0.0, 0.0, -1.0, 1.0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user