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

Antialias MeshPhysicalMaterial transmission support #21918

Merged
merged 1 commit into from
Jun 5, 2021

Conversation

takahirox
Copy link
Collaborator

Fixes: #21913

Description

This PR adds antialias MeshPhysicalMaterial transmission support with WebGLMultisampleRenderTarget.

Screenshot problem

A problem is that it works correctly on web browser but WebGLMultisampleRenderTarget doesn't seem to work correctly on Puppeteer.

I made screenshots of webgl_materials_physical_transmission and webgl_loader_gltf_transmission but transmissionSamplerMap looks black.

webgl_materials_physical_transmission

webgl_loader_gltf_transmission

I also noticed that the existing webgl2_multisampled_renderbuffers screenshot right side (using WebGLMultisampleRenderTarget) is black.

webgl2_multisampled_renderbuffers

Any ideas to resolve the problem?

@mrdoob
Copy link
Owner

mrdoob commented Jun 2, 2021

@c0d1f1ed Does swiftshader support multisample render targets?

@mrdoob mrdoob added this to the r130 milestone Jun 2, 2021
@c0d1f1ed
Copy link

c0d1f1ed commented Jun 3, 2021

@c0d1f1ed Does swiftshader support multisample render targets?

Yes, SwiftShader fundamentally supports multisample render targets. However, I'm not 100% sure if our legacy OpenGL ES implementation has all of the extensions expected by WebGL (I vaguely recall that the 'Core' multisampling functionality has potential restrictions, which are lifted by extensions such as GL_EXT_multisampled_render_to_texture).

However, we're about to replace the legacy SwiftShader OpenGL ES 3.0 implementation with SwANGLE (ANGLE + SwiftShader Vulkan), which fully supports OpenGL ES 3.1 and a larger set of extensions. You can give it a try with Chrome Canary using the --use-gl=angle --use-angle=swiftshader command line flags.

@mrdoob
Copy link
Owner

mrdoob commented Jun 3, 2021

@c0d1f1ed Thanks! That is good to know.

Turns out the issue was that we were using a very old version of Puppeteer.
Updating to 10.0.0 seems to fix it: #21948

I've also tried --use-gl=angle --use-angle=swiftshader but seems to produce black renders.
Probably the version of Chromium that Puppeteer is using is not new enough?

@mrdoob mrdoob merged commit ce47a89 into mrdoob:dev Jun 5, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jun 5, 2021

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Jun 5, 2021

@takahirox FYI cleaned it up a bit: 65e6b48

@takahirox takahirox deleted the AntialiasTransmission branch June 5, 2021 15:39
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.

Transmission anti aliasing
3 participants