0beqz / realism-effects

SSGI, Motion Blur, TRAA - Effects to enhance your three.js scene's realism
https://realism-effects-obeqz.vercel.app/
MIT License
1.41k stars 63 forks source link

"doesnt support camera of type "perspectiveCamera" #32

Closed sdraper69 closed 5 months ago

sdraper69 commented 1 year ago

Hi, great work on this!

I have the following code

const camera = new THREE.PerspectiveCamera(40, window.innerWidth / window.innerHeight, 0.01, 250)
const velocityDepthNormalPass = new PostProcessing.VelocityDepthNormalEffect(this.getThreeScene(), camera);

I am currently getting the following error

image

I have no doubt that it is completely my problem....however, I am stumped at where to start to troubleshoot it so any suggestions would be very much appreciated. Im using Threejs r155

0beqz commented 5 months ago

Hey thanks for the report, implementing OrthographicCamera support isn't so easy as quite some things need to be changed in the shader. In the newer version, OrthographicCameras are only partially supported with SSGI as in some smaller features aren't supported with it yet. So you would no longer get errors there but you still won't get the same results as with PerspectiveCameras. So it's still an issue, I especially need to verify that at least other effects like Motion Blur support it.