# WebGL

As more users visit this site and opt into helping Camoufox's WebGL research, I will eventually have a solid profile of each vendor and renderer to implement automatic WebGL data rotation in the Python library.

See analytics & research
../../webgl-research/

At the moment, if you need to spoof WebGL, you can manually do so with the following properties.


# Demo site

This repository includes a demo site that prints your browser's WebGL parameters. You can use this site to generate WebGL fingerprints for Camoufox from other devices.

See demo
https://camoufox.com/tests/webgl


# Properties

Camoufox supports spoofing WebGL parameters, supported extensions, context attributes, and shader precision formats.

Property Description Example
webGl:renderer Spoofs the name of the unmasked WebGL renderer. "NVIDIA GeForce GTX 980, or similar"
webGl:vendor Spoofs the name of the unmasked WebGL vendor. "NVIDIA Corporation"
webGl:supportedExtensions An array of supported WebGL extensions (full list). ["ANGLE_instanced_arrays", "EXT_color_buffer_float", "EXT_disjoint_timer_query", ...]
webGl2:supportedExtensions The same as webGl:supportedExtensions, but for WebGL2. ["ANGLE_instanced_arrays", "EXT_color_buffer_float", "EXT_disjoint_timer_query", ...]
webGl:contextAttributes A dictionary of WebGL context attributes. {"alpha": true, "antialias": true, "depth": true, ...}
webGl2:contextAttributes The same as webGl:contextAttributes, but for WebGL2. {"alpha": true, "antialias": true, "depth": true, ...}
webGl:parameters A dictionary of WebGL parameters. Keys must be GL enums, and values are the values to spoof them as. {"2849": 1, "2884": false, "2928": [0, 1], ...}
webGl2:parameters The same as webGl:parameters, but for WebGL2. {"2849": 1, "2884": false, "2928": [0, 1], ...}
webGl:parameters:blockIfNotDefined If set to true, only the parameters in webGl:parameters will be allowed. Can be dangerous if not used correctly. true/false
webGl2:parameters:blockIfNotDefined If set to true, only the parameters in webGl2:parameters will be allowed. Can be dangerous if not used correctly. true/false
webGl:shaderPrecisionFormats A dictionary of WebGL shader precision formats. Keys are formatted as "<shaderType>,<precisionType>". {"35633,36336": {"rangeMin": 127, "rangeMax": 127, "precision": 23}, ...}
webGl2:shaderPrecisionFormats The same as webGL:shaderPrecisionFormats, but for WebGL2. {"35633,36336": {"rangeMin": 127, "rangeMax": 127, "precision": 23}, ...}
webGl:shaderPrecisionFormats:blockIfNotDefined If set to true, only the shader percisions in webGl:shaderPrecisionFormats will be allowed. true/false
webGl2:shaderPrecisionFormats:blockIfNotDefined If set to true, only the shader percisions in webGl2:shaderPrecisionFormats will be allowed. true/false