Skip to content

Commit

Permalink
Update ShaderToyLite-demo.html
Browse files Browse the repository at this point in the history
  • Loading branch information
chipweinberger authored Jan 11, 2024
1 parent 18829cc commit e20a50a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ShaderToyLite-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,7 @@
// on iOS, texelFetch is not supported
// this is not a perfect solution, but at least gets something drawn
function isMobileSafari() {
const userAgent = window.navigator.userAgent;
const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent);
const isIOS = /iPad|iPhone|iPod/.test(userAgent) && !window.MSStream;
return isSafari && isIOS;
return /iPad|iPhone|iPod/.test(window.navigator.userAgent);
}
const safariShim = isMobileSafari() == false ? '' : `
#undef texel
Expand Down

0 comments on commit e20a50a

Please sign in to comment.