Skip to content

Instantly share code, notes, and snippets.

View baptistebriel's full-sized avatar

Baptiste Briel baptistebriel

View GitHub Profile
@baptistebriel
baptistebriel / gist:d4117bd65e4dd917b42a80e3f4afe5c6
Created October 6, 2018 10:41
Going beyond 60FPS by disabling VSync on Google Chrome
// https://medium.com/@hellomondaycom/how-we-built-the-google-cloud-infrastructure-webgl-experience-dec3ce7cd209
open -a "Google Chrome" --args --disable-gpu-vsync
@baptistebriel
baptistebriel / hello-apple.md
Created October 23, 2020 17:12 — forked from Linrstudio/hello-apple.md
solutions for window.innerWidth / innerHeight issue in iOS9

iOS9 returns double the value for window.innerWidth & window.innerHeight
The versions that are concerned are: 9.0.0, 9.0.1, 9.0.2

A few people got mad on twitter:

window.innerWidth in iOS 9 Safari returns double the number it did in iOS 8? Is this real life? tell me no — @rachsmithtweets
iOS9 Safari has the most insane bug where window.innerWidth / innerHeight is *sometimes* twice as large as it should be. ughhhh. !? — @mattdesl

iOS9 innerWidth/innerHeight is having a lot of fun these days — @ayamflow

@baptistebriel
baptistebriel / uvRotate.glsl
Created August 23, 2023 16:38 — forked from raphaelameaume/uvRotate.glsl
Rotate uv in fragment shader
vec2 uvRotate (vec2 baseUv, float angle, vec2 center) {
vec2 uv = baseUv;
uv -= center;
mat2 m = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
uv = m * uv;
uv += center;
return uv;