Three.js: Round / circular points via Three.PointsMaterial with WebGL

Created on 10 Apr 2017  路  3Comments  路  Source: mrdoob/three.js

Been learning a bit about Points. I have a series of points that make up a shape and rotate slowly. Each point is one of 6 colours.

I want to make them circular rather than square, but all of the examples I've seen to do that don't use Points at all. Should I change to a Sprite (as per this example: https://github.com/mrdoob/three.js/blob/master/examples/canvas_lines_sphere.html#L65-L90) and re-factor my code in order to get circular points, or is there another way?

Using r84

Help (please use the forum)

Most helpful comment

You don't have to use a custom shader. Check out how PointsMaterial is created in this example:

https://threejs.org/examples/#webgl_points_billboards

All 3 comments

Possibly a duplicate of https://github.com/mrdoob/three.js/issues/11016 (especially http://jsfiddle.net/myy7x4zd/10/)?

Thanks for the reply. So in summary the only way is via an image colorized via a custom shader?

Feels pretty overengineered but I guess it's a limitation of WebGL or something

You don't have to use a custom shader. Check out how PointsMaterial is created in this example:

https://threejs.org/examples/#webgl_points_billboards

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jack-jun picture jack-jun  路  3Comments

filharvey picture filharvey  路  3Comments

Horray picture Horray  路  3Comments

makc picture makc  路  3Comments

alexprut picture alexprut  路  3Comments