-
-
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: Support hierarchy and different intensity. #21487
base: dev
Are you sure you want to change the base?
Conversation
057e719
to
6238d0e
Compare
6238d0e
to
c40ddf2
Compare
That sounds good to me. |
…entMetalnessPr # Conflicts: # examples/jsm/postprocessing/SSRPass.js # examples/jsm/shaders/SSRShader.js # examples/screenshots/webgl_postprocessing_ssr.jpg # examples/webgl_postprocessing_ssr.html
Bound Material's Blender use Material's |
2a99bea
to
6bcfa75
Compare
I think /cc @WestLangley |
Bound SSRPass's opacity to Material's envMapIntensity. Demo |
No, I believe Blender's Principled BSDF |
Bound SSRPass's opacity to But require using How about, for per object ssr opacity, Still leave overrall ssrPass.opacity as is. |
Ah! Hmm... Should we "graduate" @donmccurdy Would this make sense in the context of GLTF? |
I do not think so. It may not be what you think it is. It is a very subtle effect. |
Any chance to derive the correct parameters from this equation? |
Also tried to solve the hierarchy problem . I want to use So tried to add a third parameter three.js/src/renderers/WebGLRenderer.js Line 977 in ce44c7d
Is this acceptable? Or any other better solution? Demo /cc @mjurczyk |
In In See #8529 and #8505 (comment). |
@WestLangley Thanks a lot for your learning resource! I'll investigate. |
Made a three.js version of learnopengl.com's pbr demo: Translated the code of this tut to three.js version, for better investigating and comparing. |
Doesn't seem so subtle to me? |
a69b022
to
4f18677
Compare
4f18677
to
40d50f7
Compare
I'm testing the pbr in this branch, but the current result not good. How about solve the hierarchy problem and using |
Demo
Supporting different metalness is a feature I have always wanted to add, and it is also a must-have feature.
But I have not been sure which method is the best,
one material for each metalness
,layer
or something else?It wasn't until I saw the codes in Pass.js that I realized can render
object3D
directly, not necessarilyscene
. I think this should be the best way.So now just use one
metalnessMaterial
, change it'smetalness
and render oneobject3D
in a loop.https://github.com/gonnavis/three.js/blob/c40ddf2d1114cdbf38e7da2386173267d5e5c659/examples/jsm/postprocessing/SSRPass.js#L603
But I'm still not sure, should I use the
metalness
property of object directly, or add a custom property toselects
?Is the logic of
selects
should applied consistently, rather than as an option?Use
scene.tranverse
orscene.children.forEach
?I'm still looking for the most suitable solution, and want to avoid breaking changes as much as possible.