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

Reflector/Refractor: Add multisampling support. #23444

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 9, 2022

Related issue: #22933

Description

Introducing multisampling support to Reflector and Refractor.

I've noticed there are multiple ways how three.js currently names variables/properties which define how many samples are used in context of multisampling:

If I had to make a choice I would pick sampleCount although the others are of course good, too. We should just ensure to use the same syntax everywhere.

@mrdoob mrdoob added this to the r138 milestone Feb 9, 2022
@mrdoob mrdoob merged commit b7d12a5 into mrdoob:dev Feb 9, 2022
@mrdoob
Copy link
Owner

mrdoob commented Feb 9, 2022

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Feb 9, 2022

Regarding WebGLMultisampleRenderTarget...

What do you think about removing that class and adding a samples property to WebGLRenderTarget instead?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 9, 2022

We also have to move ignoreDepthForMultisampleCopy, useRenderToTexture and useRenderbuffer to WebGLRenderTarget then. And closely test with WebXR.

However, after all it's probably best to head for this change since starting with WebGL 2 multisampling is a common thing for all render targets.

@mrdoob
Copy link
Owner

mrdoob commented Feb 9, 2022

Exactly. samples should probably be 0 by default though...
Do you want to give it a go?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 9, 2022

I'll take a look 👍 .

@vanruesc
Copy link
Contributor

It might also be worth considering merging WebGLMultipleRenderTargets into WebGLRenderTarget since multisampling and MRT are currently mutually exclusive as explained in #23300. There's an open PR that appears to address this: #22089.

@mrdoob
Copy link
Owner

mrdoob commented Feb 10, 2022

@vanruesc yes, one step at a time though... 🤓

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

Successfully merging this pull request may close these issues.

None yet

3 participants