Pinpoint
Pinpoint copied to clipboard
Variable max texture size on WebGL depending on browser
https://browserleaks.com/webgl
const canvas = document.createElement('canvas');
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
// Check if WebGL is supported
if (gl) {
const maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
console.log('Maximum texture size:', maxTextureSize);
} else {
console.log('WebGL not supported');
}
https://docs.unity3d.com/ScriptReference/SystemInfo-maxTextureSize.html
While fixing this also replace SetSelectionLayer loop with Array.Fill(pixels, transparent);
Just reduced max to 8192 since the workaround doesn't seem to fix it properly