yasirkula/Unity360ScreenshotCapture

Camera rotation is ignored

Closed this issue · 3 comments

The cubemap is always rendered facing the same way, camera rotations is not used. I suggest rotating the capture to match with the camera rotation.

Since cubemap can't really be rotated, I think the way to do this would be by passing the camera angle to the shader as a parameter, and then rotating in the shader.

Sbarn commented

Hi, same problem here, how can I do to rotate the shader ?

I've updated the code to take the Y rotation of the camera into account (determined by I360Render.Capture's faceCameraDirection parameter). Can you give it a try and see if there are any visual artifacts: 360Screenshot.zip

As far as I can see it works perfectly, thank you!