Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will WebGL ever render points as circles?

Tags:

webgl

On desktop OpenGL, points will sometimes be rendered as circles (if you have set gl_PointSize in the vertex shader). I am tinkering with WebGL and it seems to consistently render points as squares (when gl_PointSize is set). Is there a way to get them to render as circles?

like image 913
Stephen Avatar asked Feb 03 '26 02:02

Stephen


1 Answers

Yes, there is a solution. You can do that using point sprites. Just send texture to shader and using alpha blending cut of unnecessary part of sprite.

Normally (in desktop OpenGL) you may see points rendered as circles when you have got MSAA and POINT_SMOOTH feature enabled.

Below you have links where you can get all informations you need :)
OpenGL ES 2.0 Equivalent for ES 1.0 Circles Using GL_POINT_SMOOTH? http://klazuka.tumblr.com/post/249698151/point-sprites-and-opengl-es-2-0

like image 118
trebor Avatar answered Feb 06 '26 07:02

trebor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!