ThreeJS SSAO Shader w/ Skinned/Animated Models

半腔热情 提交于 2019-12-11 18:05:41

问题


Is the SSAO shader included with ThreeJS compatible with skinned/animated models? I've implemented the SSAO shader in my sandbox here:

http://www.titanpass.com/game_development/my_first_game/index.html

Oddly, you will notice a kind of white shell around all the monsters as they move. This is the SSAO effect that is not updating with the skinned animations.

Any suggestions or insight on this issue would be greatly appreciated.


回答1:


Problem solved!

Just had to use THREE.DepthPassPlugin() based on the following example code:

http://alteredqualia.com/three/examples/webgl_postprocessing_ssao.html

You can get the code by using ctrl-s to save the html to your own computer.



来源:https://stackoverflow.com/questions/21817406/threejs-ssao-shader-w-skinned-animated-models

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!