Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable multisampling when webgl2 isn't supported #28

Closed
drcmda opened this issue Aug 13, 2020 · 5 comments · Fixed by #43
Closed

disable multisampling when webgl2 isn't supported #28

drcmda opened this issue Aug 13, 2020 · 5 comments · Fixed by #43
Labels
enhancement New feature or request

Comments

@drcmda
Copy link
Member

drcmda commented Aug 13, 2020

right now rpp crashes in safari.

@talentlessguy
Copy link
Member

afaik three.js has WebGL.isWebGL2Supported – we could use it

will check again and PR

@drcmda
Copy link
Member Author

drcmda commented Aug 15, 2020

i think we can even compare the renderer (gl = useThree()) against three.webgl1renderer or something like that. because even if the webgl2 is supported, it's more about what users are actually using (they can always pick webgl1, even though the default in threejs is now webgl2). if we figure that out, all we need to do is set multisampling to 0 and safari is safe.

@talentlessguy talentlessguy added the enhancement New feature or request label Aug 15, 2020
@austinmayer
Copy link

Great library, +1 on this issue.

@connorholyday
Copy link
Contributor

This is what I'm doing to fix things at the moment:

import { WEBGL } from 'three/examples/jsm/WebGL'

function Effects() {
  const multisampling = WEBGL.isWebGL2Available() === false ? 0 : 8

  render (<EffectComposer multisampling={multisampling}>{/* ... */}</EffectComposer>)
}

Could something like this be used to set the multisampling default to 0?

The content of isWebGL2Available() is nice and small

@drcmda
Copy link
Member Author

drcmda commented Sep 18, 2020

oh, yes, could you make a pr?

would make sense to copy this function and then run:

isWebGL2Available() ? value : 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants