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

fix: WebGLMultipleRenderTargets is removed in r172. #309

Conversation

codergigachad
Copy link
Contributor

@codergigachad codergigachad commented Jan 1, 2025

Replaced it with WebGLRenderTarget. The library is not working without this change in the latest version of three. Moreover I haven't thoroughly tested this change. This seems to work initially. The removal also says to use the count parameter to use MTR, which I don't have enough knowledge of.

…th WebGLRenderTarget. Without it the library is not working

modified: src/effects/SSR/screen-space-reflections.js
@codergigachad codergigachad changed the title WebGLMultipleRenderTargets is removed in r172 and the library is not working without this change in the latest version of three fix: WebGLMultipleRenderTargets is removed in r172. Jan 1, 2025
Comment on lines 681 to 680
this.gBuffersRenderTarget = new WebGLMultipleRenderTargets(width, height, 2, {
this.gBuffersRenderTarget = new WebGLRenderTarget(width, height, 2, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be new WebGLRenderTarget(width, height, { count: 2, ... }).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should update threejs to at least 162 to use it :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we have to shim or polyfill the class here depending on the installed three version. I'll do this myself since it's a bit of a hack.

@pikooli
Copy link

pikooli commented Jan 7, 2025

it in the file src/effects/N8AO/N8AOPostPass.js too.

line 193

@CodyJasonBennett CodyJasonBennett merged commit 0f4acdb into pmndrs:master Jan 7, 2025
1 check passed
Copy link

github-actions bot commented Jan 7, 2025

🎉 This PR is included in version 2.16.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

postprocessing 6.36.6 and three 172 break @react-three/postprocessing
3 participants