Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6805851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:38:14+00:00 2026-05-26T19:38:14+00:00

I am rendering a huge point cloud (1.5 Mio. points) as GLPoints with WebGL

  • 0

I am rendering a huge point cloud (1.5 Mio. points) as GLPoints with WebGL and naturally encounter performance issues.

So my first idea is limit the amount of points be drawn on the screen. Especially points far away from the camera are “useless” and should not be rendered.

I went about it by calculating the distance between any point and the camera. In my vertex shader I would like to only render the points “close” enough to the camera. So far I try to skip them if the distance “s” is in between the camera and a clipping plane (hence negative).

if( s < 0.0){
  gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
  frontColor = vec4(0.0, 0.0, 0.0, 1.0);
  gl_PointSize = 0.0;
}else{
  gl_Position = ps_ProjectionMatrix * ecPos4;
}

However, instead of completely skipping the vertex it is still rendered (even if I don’t see it) as I can tell by the FPS displayed.
Is there a way to completely disable/skip/”delete” a vertex within a vertex shader?


I can see how frustum culling would help speed things up. To clearify things, when should the culling take place? Since the culling has to be recalculated after every camera movement, should I put in my main loop? However doing 1 Mio. calculations in the render loop does not seem to be a very good idea.

Do I understand it correctely that once my camera looks in totally different direction than my points these should be clipped automatically by WebGl/the hardware? Yet, I get the feeling that looking “away” does not help. (FPS did not go up) Can someone please elaborte a bit!

The engine that I use has a default perspective projection matrix. Obiviously it affects the coordinates of every vertex. How does the projection matrix relate to the auto clipping?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:38:14+00:00Added an answer on May 26, 2026 at 7:38 pm

    It sounds like you need to tweak your projection matrix, so that your view frustum culls out those points that are too far away to meaningfully contribute to your image. This tutorial from lighthouse3d provides a description of the viewing frustum, and describes methods for implementing frustum-based culling in software. Note that this is not necessary in your case, since OpenGL does it for you, provided you’ve set up your projection matrix appropriately.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having major rendering issues in Safari with the web application I'm working on.
First example: You can take a huge rock shaped mesh and put a tiled
While rendering the view page, based on some condition in the controller action I
I am rendering a rails partial and I want to alternate the background color
If I'm rendering a regular view in asp.net mvc the only domain object properties
I am rendering an OpenGL scene that include some bitmap text. It is my
I am actually rendering an excel file in the browser. I use the Response.Writefile(filePath)
I'm rendering some HTML in a QT QLabel. The HTML looks like this: <pre>foo\tbar</pre>
What underlying rendering system does the Qt GUI toolkit use on Windows? (I'm assuming
MRT allows for rendering to multiple texture targets in the pixel shader, but I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.