Compute Shaders, a basic particle system drawn with a vertex fragment shader
A post for reference really... Not a lot of magic here - except we're using a Graphic procedural - a point- to draw particles. To do this we calculate the position of the particles in the compute shader, then a standard vert-frag shader assigned to a material reads from the gpu buffer and draws the points accordingly. We're also getting the mouse position on screen converted to World Space & having the particles follow that coordinate. The C# is as follows, careful with the comments i've left...blogger's formatting is a bit wonky - using System.Collections; using System.Collections.Generic; using UnityEngine; #pragma warning disable 0649 public class particle_dave : MonoBehaviour { private Vector2 cursorPos; // struct of a particle, fairly simple attributes struct Particle { public Vector3 position; public Vector3 vel...