也许有一些关于如何应用环境光遮挡的提示?多亏了 WestLangley,阴影才得以修复!现在回到其他问题:有没有关于 Threejs 着色器的有用资源,或者只是一般的 hlsl? 解决方案 有几种方法可以产生环境光遮挡:全局照明 (GI)光强度的全局低频近似值(GI 捷径)屏幕空间近似值,通常称为 SSAO(屏幕空间环境光遮挡)这里有一些关于three.js中环境光遮挡的讨论:https://github.com/mrdoob/three.js/issues/6575 [实时全局/间接照明]https://github.com/mrdoob/three.js/issues/4434 [体素锥体追踪全局照明]https://github.com/mrdoob/three.js/issues/5554 [更好的阴影贴图]很可能您想参考three.js中的这个例子来开始:http://threejs.org/examples/#webgl_postprocessing_ssaoI've just finished porting of my first cloth simulation from opengl to webgl using three.js (can be seen here).The thing is it looks a bit dull, and I want to add (as i hope i remember correctly from my computer graphics classes) ambient occlusion, to make the cloth nicely shaded on collision with ball. My knowledge about shaders is now on very low level, so I'd be very thankful for any resources on this topic helpful with three.js development (tutorials, book titles etc), because googles doesn't know anything about it.Maybe some hints how to apply ambient occlusion?So the shading is fixed thanks to WestLangley!Now back to the other questions: any helpful resources on shaders for threejs, or just hlsl in general? 解决方案 There are several ways to produce ambient occlusion:global illumination (GI)global low-frequency approximation of light intensity (GI shortcuts)screen-space approximations, most commonly referred to as SSAO (screen space ambient occlusion)here are a few discussions on ambient occlusion in three.js:https://github.com/mrdoob/three.js/issues/6575 [Real Time Global/Indirect Illumination]https://github.com/mrdoob/three.js/issues/4434 [Voxel Cone Tracing global illumination]https://github.com/mrdoob/three.js/issues/5554 [Better shadow maps]most likely you would want to refer to this example from three.js to start you off:http://threejs.org/examples/#webgl_postprocessing_ssao 这篇关于Threejs中的环境遮挡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-05 04:30