Recently, I've started exploring three.js and shaders for the first time. I'm trying to generate a sphere made up of particles that move like waves across its surface. Currently, my progress looks like this: https://i.sstatic.net/CqyOe.png
However, I am aiming for a result that looks more like this: https://i.sstatic.net/0mNFP.jpg
So, I'm wondering how I can render each point as a circle or possibly with a texture applied? Here is a snippet of my fragment shader code:
uniform sampler2D texture;
uniform vec2 repeat;
uniform float uTime;
varying vec2 vOffset;
precision mediump float;
varying vec3 vColor;
varying vec2 vUv;
void main()
{
vec2 uv = vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y );
vec4 tex = texture2D( texture, uv * 0.5);
gl_FragColor = vec4(vec3(0.5, 0.8, 0.85), 0.8);
}
I have attempted to use 'gl_FragColor = tex' to render the texture in place of the color, but it doesn't seem to be working as expected. The texture I am using is simply a particle image.