WebGLRenderer: Don't support double-sided, transmissive objects with WEBGL_multisampled_render_to_texture
.
#28196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #28131
Description
The renderer supports double-sided, transmissive objects only with multisampled transmissive render targets. That's because the transmissive render target is used as source and target which normally would produce a feedback loop. The loop isn't "visible" because multisampled render targets use more than one framebuffer.
This assumption is not true when the
WEBGL_multisampled_render_to_texture
extension is available since it enables multisampling support without an explicit resolve. This currently means double-sided, transmissive objects show no inner reflections with the Quest browser and produce a WebGL warning in the browser console.Until a solution is available (see #28131 (comment)), I suggest to exclude double-sided, transmissive objects in
renderTransmissionPass()
whenWEBGL_multisampled_render_to_texture
is available. This avoids the WebGL warning and improves the performance.