Skip to content

Instantly share code, notes, and snippets.

View gkjohnson's full-sized avatar
🚀

Garrett Johnson gkjohnson

🚀
View GitHub Profile
function test(count = 100) {
const gl = document.createElement('canvas').getContext('webgl');
function compileShader(gl, shaderSource, shaderType) {
var shader = gl.createShader(shaderType);
gl.shaderSource(shader, shaderSource);
gl.compileShader(shader);
return shader;
}
@gkjohnson
gkjohnson / gpu-info.js
Last active July 24, 2024 02:54
Extracting more detailed GPU information in a browser.
// Extracting more detailed GPU information in a browser.
// NOTE: This won't work with some privacy settings enabled
// and has only been tested with the following return values
// Could be used to guess at a GPUs power using existing benchmarks here:
// https://www.videocardbenchmark.net/GPU_mega_page.html
// https://www.techpowerup.com/gpu-specs/
// http://codeflow.org/entries/2016/feb/10/webgl_debug_renderer_info-extension-survey-results/
// http://www.gpuzoo.com/
// https://docs.google.com/spreadsheets/d/1wGRZ-5sl7G9DhIgwW36g2KnrwVfZqBW7GDKHOd2vbaM/edit#gid=0