-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
SSRPass: throws err for a simple scene. #21379
Comments
/ping @gonnavis |
Received, I will try to find out what the problem is. |
@ycw Thanks for your convient demo code! @Mugen87 After some testing, I found it may caused by the Because after I removed all composer related codes, and use I'll continue to research the problem and try to solve it if I can. |
Probably a duplicate of #18533. |
@gonnavis @Mugen87 I don't know why it works after swapping the order of meshes creation. ( regular mesh first, followed by instanced mesh ) see https://jsfiddle.net/trch4517/ |
Yeah, I also found in this non-composer scene https://jsfiddle.net/gonnavis/hjgdrfv5/2/ , the instancedMeshes (two spheres) which probably caused this problem are rendered, but the ordinary mesh (the cube) not rendered. So it should be the error throwed in instancedMesh blocked the subsequent ordinary mesh render. After swap the creation in this non-composer scene https://jsfiddle.net/gonnavis/hjgdrfv5/5/ , I see one ordinary mesh and one instance rendered ( should be the first instance rendered ). So the normal infos still not all correct, this is why in https://jsfiddle.net/trch4517/ just one sphere has reflection. |
Okay, in this case I mark this issue as a duplicate of #18533 since it's the same cause (and the same generic solution is required). |
thanks |
@ycw @Mugen87 The main problem may because of instancedMesh and regular mesh can't share same material now. One obvious low-performance workaround is, at here insert
and replace these codes three.js/examples/jsm/postprocessing/SSRPass.js Lines 576 to 578 in c21b290
then it works well. If do some type check, just create two But the fundamental problem seems too in-depth for me to solve~~ |
If it's only about material sharing, #20135 should fix it. In any event, we should not start to add fixes per pass. The renderer should handle this internally. |
@gonnavis @Mugen87 @mrdoob i tried to merge #20135 ( w/ few bugfixes ) to r126 dev and .. it works! https://jsfiddle.net/m7bcex6s/1/ thanks. |
Describe the bug
render()
onEffectComposer{}
which is added aSSRPass
.Mesh
s andInstancedMesh
s.To Reproduce
Steps to reproduce the behavior:
composer.render()
in animation loop.stacktrace:
Live example
Expected behavior
it should render a box and two spheres .. w/ reflection on their surfaces.
Platform:
Thanks.
The text was updated successfully, but these errors were encountered: