pmndrs / react-postprocessing

📬 postprocessing for react-three-fiber
https://docs.pmnd.rs/react-postprocessing
MIT License
1.12k stars 106 forks source link

Old N8AO dependency in package.json is causing Shader Error 0 when three.js > 0.166.0 is installed as well #291

Closed ayan4m1 closed 1 month ago

ayan4m1 commented 1 month ago

For context, see https://github.com/N8python/n8ao/issues/32

Basically, postprocessing depends explicitly on a fairly old version of N8AO , which is not compatible with Three.js starting from 0.166.0. This means that if you use the N8AO convenience component in postprocessing, you will get a Shader Error unless you hold three.js back.

I think there are multiple possible solutions here:

  1. Kick the can and just bump n8ao to latest in package.json
  2. Make n8ao a peerDependency with a semver range like "1.x" and then make the user install/upgrade it on their own
  3. Document the bug and do nothing else

My preference would be for the second choice, but obviously open to discussion. Happy to open a PR if there is consensus.

Repro: https://github.com/ayan4m1/leela-memorial (then upgrade three.js to latest and run yarn install, npm start, go to "3D view" page and observe error)

hallo-yurik commented 1 month ago

I have the same error. On version three 0.168.0 "SSAO" doesn't work and after using "N8AO" I get this error

image

N8python commented 1 month ago

This is because the N8AO they are using is very old :(. 1.9.2 is neccessary.

CodyJasonBennett commented 1 month ago

We're not able to use N8AO upstream since it pulls from three/examples and creates a dual package hazard for us. There is an additional issue of how/whether we update N8AO as it is not backwards compatible.

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 2.16.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

ayan4m1 commented 1 month ago

Appreciate the fix!

N8python commented 1 month ago

Elaborate on what you mean by 'dual package hazard'? How would I alleviate this?

N8python commented 1 month ago

If N8AO was to be entirely self-contained, would this issue be resolved? And an update could be made?