Texture UV with THREE.Points: Part 2

Description of the problem

[Not sure if this is a Doc issue or a Feature request]
I have several tests for features to be migrated into a project.
Here is a BufferGeometry of quads uv mapping a 4 sprite sheet:

http://backspaces.net/temp/three/bufftexs.html

Here is a Points geometry with colors

http://backspaces.net/temp/three/points.html

I am unable to combine them: uv mapped point sprite. I do understand how individual uv sprites can be a texture for a point sprite but this requires a render-per-sprite. There is an example/ of this and SO shows how:

https://stackoverflow.com/questions/29526855/how-to-do-uv-mapping-on-a-threejs-sprite-r71

For me one-sprite-per-render is awkward to manage and liable to be slow (I easily reach 100 or more sprites). I realize this would require more than a single uv per point rather than the 1 uv per quad vertex, possibly BL & TR would suffice?

#8441 mentioned using ShaderMaterial but I did not see an example/ of this. (There’s a jsbin).

  • Is it possible to do this now and I missed it? [Doc issue]
  • Is there an example/ of ShaderMaterial for one-render sprite sheet use? [Doc issue]
  • Is this a desired capability that could be added to PointGeometry? [Feature issue]
Three.js version
  • Dev
  • r84
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Early 2015 MBP, Sierra.

Author: Fantashit

1 thought on “Texture UV with THREE.Points: Part 2

Comments are closed.