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

WebGLMultipleRenderTargets: Example fix iOS with MSAA #24141

Merged
merged 2 commits into from
May 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/webgl2_multiple_rendertargets.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@

renderTarget.texture[ i ].minFilter = THREE.NearestFilter;
renderTarget.texture[ i ].magFilter = THREE.NearestFilter;
renderTarget.texture[ i ].type = THREE.FloatType;

}

Expand Down Expand Up @@ -246,6 +245,13 @@

renderTarget.samples = parameters.samples;

// safari prior 15.5 needs the renderer to be cleared()
// if ( parameters.samples > 0 ) {

// renderer.clear();

// }

Copy link
Contributor

@CodyJasonBennett CodyJasonBennett May 27, 2022

Choose a reason for hiding this comment

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

This also affected scenes that used antialias on the renderer, with gl.clear() being a workaround that accepted any combination of bits -- even simply zero.

Since being patched, I think we can direct users to keep their browsers up-to-date rather than employ these workarounds. iOS is a bit too unstable for comfort.

scene.traverse( function ( child ) {

if ( child.material !== undefined ) {
Expand Down