Skip to Content
Platform.Ontology

WebGL shader precision formats

Reads float and integer precision ranges the GPU shader units support.

Used to track youGraphics and fingerprintingWebGLWeb browsersWhen the page loads

In one line

Can check how precise your graphics chip maths is, to guess your chip family

Reads float and integer precision ranges the GPU shader units support.

Mobile GPUs report different mediump and highp precision, so the numbers separate desktop, Apple, Adreno, Mali and PowerVR families.

What it can and can't do

What the user does: Nothing. It happens when the page loads

It can

  • Check number precision limits in the graphics chip
  • Tell desktop, Apple, Adreno, Mali and PowerVR families apart
  • Add that clue to a device profile

It cannot

  • Ask permission first
  • See your files
  • Show you anything on screen
  • Name your exact device by itself

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported92011-02-03None
EdgeSupported792020-01-15None
FirefoxSupported42011-03-22None
SafariSupported82014-10-16None
Safari on iPhoneSupported82014-09-17None
Chrome on AndroidSupported9Not listedNone
Samsung InternetSupported5.02016-12-15None

How a site asks for it

APIgl.getShaderPrecisionFormat(shaderType, precisionType)
How access is grantednone
What the user seesNot listed
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsNot listed
How to take it backNot listed
Inside an iframeNot listed

Typical flow

  1. Call getShaderPrecisionFormat for VERTEX and FRAGMENT x LOW, MEDIUM, HIGH x FLOAT, INT

Data you get

What comes back: 12 triples (rangeMin, rangeMax, precision)
Shape: list

FieldTypeUnitRangePrecision
rangeMinintegerexponent0 to 127exact
precisionintegerbits0 to 23exact

Technical limits

  • Low entropy alone; useful to pin GPU family

The story

What it is

A script reads the number ranges your graphics chip supports for floats and integers.

For you

You never see it. Your browser reports how exactly your graphics chip can handle numbers. Phones and laptops differ, so the answers are a small clue about your device.

For makers

Game and graphics code needs this to avoid visual glitches on weaker chips. Fingerprinting tools add it to a bundle, because it cleanly separates mobile and desktop graphics.

Where you see it

TypeExampleApps
gamesA browser game uses lower precision on phones to run faster, after checking what the chip supports.None named
creativeA web photo editor with filters picks the right math so colors do not band on older phones.None named
mapsA web map draws smooth shading only if the chip supports high precision numbers.Mapbox
securityA fraud tool checks that the reported graphics type matches the device model.None named
adsA tracker adds the precision numbers to the graphics part of a device ID.None named
developerA graphics developer logs these numbers to understand why a shader looks broken on one phone.None named
ar-vrA web based AR viewer checks precision before it enables advanced lighting.Sketchfab

Risks

  • Reveals chip class
  • Adds to a device ID

What the platform says

Good uses and abuse

Legitimate uses

  • Choose shader variants

Known abuse

  • Component of composite fingerprints

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility1 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits2Rough identifying entropy, when known

Sources

How well checked: Based on official documentation.

On this page