CubeCamera 作为球体几何的纹理 =>立方体结构太明显了......反应三纤维
我希望这条消息能让您满意
codesandbox : https:// codesandbox.io/s/compassionate-goldwasser-yl3sr3?file=/src/App.js
我一直在关注上一个教程Yuri Artiukh 谈噪音 (https://www.youtube .com/watch?v=sPBb-0al7Y0&t=561s&ab_channel=YuriArtiukh)将其“翻译”为 R3F。这是一场爆炸,但我遇到了一个无法真正解决的特殊问题:
我正在使用 CubeCamera 来镜像背景的着色器,并且它工作正常,唯一的问题是立方体的“结构”在球体中清晰可见。我不知道它是否来自片段着色器或立方体相机渲染器的设置。有谁知道如何解决它。
为此,我使用 @react- Three/drei 中的 CubeCamera 组件:
以及您可以在此处找到的菲涅耳着色器:https://github.com/ebrahma/thirdjs_div_testing/blob/b5aa918fba0da04e5b78ee6168450945b5630b71/js/third-lib/shaders/FresnelShader.js
谢谢, 亚历克斯
I hope this message finds you well
codesandbox : https://codesandbox.io/s/compassionate-goldwasser-yl3sr3?file=/src/App.js
I've been following the last tutorial of Yuri Artiukh on noise (https://www.youtube.com/watch?v=sPBb-0al7Y0&t=561s&ab_channel=YuriArtiukh) to "translate" it in R3F. It's been a blast but i'm confronting one special issue I can't really resolve :
I'm using a CubeCamera to mirror the shader of the background, and it's working fine, the only problem is that the "structure" of the cube is clearly seeable in the sphere. I don't know if it's coming from the fragment shader or the set up of the renderer for the cube camera. Does anyone has any idea how to solve it.
to do so, I use the CubeCamera component from @react-three/drei :
plus a fresnel shader that you can found here : https://github.com/ebrahma/threejs_div_testing/blob/b5aa918fba0da04e5b78ee6168450945b5630b71/js/three-lib/shaders/FresnelShader.js
To show it clearly, I have that :
Thanks,
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论