0

what am trying to accomplish is to to put a different pixel data as the material of each particle, this is my train of thought: set a canvas as texture of a PlaneGeometry, get pixel chunks of data from PlaneGeometry through fragment shader and put different chunks of that pixel data on any particle I want through the particlesystem's fragment shader, is this posible?

Memo Lestas
  • 393
  • 1
  • 4
  • 13

1 Answers1

0

Yes, you can use a custom THREE.ShaderMaterial with THREE.ParticleSystems. Also worth noting is that if you simply want to use a canvas as a texture, you don't need to go through PlaneGeometry.

Tapio
  • 3,466
  • 1
  • 20
  • 20
  • Thanks Tapio, the reason for going to PlaneGeometry is because, in order to get data directly from canvas I should use getImageDate() which is very slow, I intend to use fragmenshader of the Planegeometry to obtain this data instead – Memo Lestas Mar 24 '13 at 04:06
  • hey @Tapio can you check out this? thenks a lot http://stackoverflow.com/questions/15697898/why-particle-system-with-shader-doesnt-work-three-js – Memo Lestas Mar 29 '13 at 06:06