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

OpenGL: 3D resolution scaling does not scale the image to the full viewport size #70142

Closed
zaevi opened this issue Dec 16, 2022 · 2 comments
Closed

Comments

@zaevi
Copy link
Contributor

zaevi commented Dec 16, 2022

Godot version

4.0.beta8

System information

Win11, gl_compatibility

Issue description

Scaling 3D doesn't work on gl_compatibility renderer.

renderer=forward+, scale=0.5:
image

renderer=gl_compatibility, scale=0.5:
image

renderer=gl_compatibility, scale=0.5, running on web:
image

Steps to reproduce

see reproduction project below

Minimal reproduction project

web_3d_scaling.zip

@akien-mga akien-mga added this to the 4.0 milestone Dec 16, 2022
@akien-mga akien-mga moved this to To Assess in 4.x Priority Issues Dec 16, 2022
@akien-mga akien-mga moved this from To Assess to Todo in 4.x Priority Issues Dec 16, 2022
@Calinou Calinou changed the title Scaling 3D doesn't work on gl_compatibility renderer. OpenGL: 3D resoution scaling is not implemented yet Dec 16, 2022
@Calinou Calinou modified the milestones: 4.0, 4.x Dec 16, 2022
@Calinou
Copy link
Member

Calinou commented Dec 16, 2022

For reference, 3D resolution scaling was added to Vulkan rendering backends in #51870.

Implementing this in OpenGL has some caveats:

  • The renderer is low-end-oriented. The mere act of splitting 2D buffers from 3D buffers has a noticeable overhead on the target hardware. In general, the fewer passes are run, the better.
    • We can probably use a separate, faster approach if the scale is 1.0, but this will make the code more complex.
  • FSR 1.0 will most likely not be available, given it has a significant cost on mobile devices and integrated graphics.1

It's still worth implementing this in OpenGL, but resolution scales close to 1.0 like 0.8 or 0.9 may not be worth it on all devices.

Footnotes

  1. It is possible to implement FSR 1.0 using only OpenGL despite official support being limited to Direct3D 12 and Vulkan, but it requires support for newer Shader Model versions on the hardware.

@Calinou Calinou changed the title OpenGL: 3D resoution scaling is not implemented yet OpenGL: 3D resolution scaling is not implemented yet Dec 16, 2022
@Calinou Calinou modified the milestones: 4.x, 4.0 Dec 16, 2022
@Calinou Calinou added bug and removed enhancement labels Dec 16, 2022
@Calinou Calinou changed the title OpenGL: 3D resolution scaling is not implemented yet OpenGL: 3D resolution scaling does not scale the image to the full viewport size Dec 16, 2022
@clayjohn clayjohn modified the milestones: 4.0, 4.x Dec 16, 2022
@clayjohn
Copy link
Member

clayjohn commented Jan 8, 2024

Fixed by #83976

@clayjohn clayjohn closed this as completed Jan 8, 2024
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

4 participants