ThreeJS SSAO Shader w/ Skinned/Animated Models

2019-09-08 17:04发布

问题:

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.