This example is running in WebGL2 and should work in most browsers. You can check the WebGPU examples here.
//! Simple benchmark to test rendering many point lights. //! Run with `WGPU_SETTINGS_PRIO=webgl2` to restrict to uniform buffers and max 256 lights. use PI; use ; use ; // NOTE: This epsilon value is apparently optimal for optimizing for the average // nearest-neighbor distance. See: // http://extremelearning.com.au/how-to-evenly-distribute-points-on-a-sphere-more-effectively-than-the-canonical-fibonacci-lattice/ // for details. const EPSILON: f64 = 0.36; // System for rotating the camera // System for printing the number of meshes on every tick of the timer ; // System for printing the number of meshes on every tick of the timer ;