Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen space reflections behaving strangely on orthographic Camera #49204

Open
Kinwailo opened this issue May 30, 2021 · 4 comments
Open

Screen space reflections behaving strangely on orthographic Camera #49204

Kinwailo opened this issue May 30, 2021 · 4 comments

Comments

@Kinwailo
Copy link

Godot version:
3.3.2 stable

OS/device including version:
Win7

Issue description:
The old issue: #11841 stated it fixed and closed, but I found it still happen in 3.3.2

@Calinou
Copy link
Member

Calinou commented May 30, 2021

@Kinwailo Please upload a minimal reproduction project to make this easier to troubleshoot.

Also, which graphics card model and rendering backend are you using?

@Kinwailo
Copy link
Author

Graphics card model and rendering backend: GTX660 GLES3
Minimal reproduction project: ssr.zip

@Calinou
Copy link
Member

Calinou commented May 30, 2021

I can confirm this on 3.3.2 on Linux + NVIDIA, but only in the running project. In the editor, the SSR perspective is correct when using an orthographic camera:

image

It also breaks when enabling camera preview in the editor:

image

What's interesting to note is that rotating the camera will further break the SSR perspective. Left is editor with camera preview enabled, right is running project:

image

But this does not happen while in the editor with a similar angle, when not using camera preview:

image

@Geometror
Copy link
Member

Geometror commented Jun 3, 2021

I did some investigation and it seems like there is something wrong with the depth related calculations in the screen space reflection shader, although I couldn't figure out how to fix it yet. However, a workaround would be setting the cameras origin(translation) further away to something like x=200, y=200, z=200 (which is actually the case with the editor's viewport camera; this is why it looks correct in the editor) and setting the "Far" property to something around 500. You might need to adjust the rotation of the camera (x to around -35 for example in your test project). This also applies to SSAO (issue #19747).

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants