A few vertices are hidden using a geom shader

Hello.
Without a geometric shader, I see all vertices. For tests, I use point rendering.
vert:

#version 460

layout(location = 0) in vec3 position;

layout(set = 0, binding = 0) uniform CameraUBO {
  mat4 projection;
  mat4 view;
  mat4 viewInverse;
} camera;

layout(push_constant) uniform Push {
  mat4 modelMatrix;
} mesh;

void main() {
  gl_Position = camera.projection * camera.view * mesh.modelMatrix * vec4(position, 1.0);
  gl_PointSize = 10.0;
}

But if I use a geometric shader a few points are just ignored.
vert - same without gl_PointSize
geom:

#version 460

layout(points) in;
layout(points, max_vertices = 1) out;

void main() {
    gl_PointSize = 10.0;
    gl_Position = gl_in[0].gl_Position;
    EmitVertex();
    EndPrimitive();
}

I have never worked with geometric shaders before. I don’t understand what can prevent rendering all the points. What could be the reasons?

Solved. I had to change the topology to ePointList in the VK Pipeline.

1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.