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

Local to Scene ViewportTextures proxy is invalid. #68371

Open
EMBYRDEV opened this issue Nov 7, 2022 · 10 comments
Open

Local to Scene ViewportTextures proxy is invalid. #68371

EMBYRDEV opened this issue Nov 7, 2022 · 10 comments

Comments

@EMBYRDEV
Copy link
Contributor

EMBYRDEV commented Nov 7, 2022

Godot version

4.0 beta 4

System information

Windows 11, Vulkan, RTX 2070Super

Issue description

I am porting over a setup that I had working in Godot 3.5 for rendering the world at a lower resolution and then upscaling without pixel jitter that involves using two viewport textures. This works in the editor but when the game launches I get the following errors and I am met with a black screen.

Screenshot_35

Steps to reproduce

Screenshot_32

Screenshot_33

When the game is launched you will be met with a black screen.

Screenshot_34

Minimal reproduction project

project.zip

@akien-mga akien-mga added this to the 4.0 milestone Nov 7, 2022
@Calinou
Copy link
Member

Calinou commented Nov 7, 2022

Note that rendering 2D and 3D at different scale factors is supported out of the box in 4.0.beta (Scaling 3D project settings), but nearest-neighbor filtering isn't implemented yet for 3D scaling.

@EMBYRDEV
Copy link
Contributor Author

EMBYRDEV commented Nov 7, 2022

Note that rendering 2D and 3D at different scale factors is supported out of the box in 4.0.beta (Scaling 3D project settings), but nearest-neighbor filtering isn't implemented yet for 3D scaling.

Yeah I'm very specifically rendering at a low resolution, blitting it to a buffer 4x (although the ideal multiple is floor(screenSize / nativeRes)) it's size to maintain pixelation and then stretching that texture using bilinear filtering so that I avoid issues with different screen sizes that aren't multiples of the native res having inconsistently scaled pixels.

Nearest filtering on the native viewport resolution would lead to undesirable side effects for me.

(Take any game that does that and you'll see that pixels aren't all the same size and the game will shimmer as you resize the window)

@EMBYRDEV
Copy link
Contributor Author

EMBYRDEV commented Nov 7, 2022

Reproduced on macOS 13, M1 Max.

@EMBYRDEV
Copy link
Contributor Author

EMBYRDEV commented Nov 7, 2022

When running in gl_compatibility mode the viewport does render but incorrectly. The color of the cube is not deterministic but I get cyan most often. I have had it render the cube correctly only once however the world environment was not respected.

image

@Rindbee
Copy link
Contributor

Rindbee commented Nov 8, 2022

Error messages could be fixed by #64388.

The rest of the problem can be solved by adding the environment and sun.

0.mp4

@EMBYRDEV
Copy link
Contributor Author

EMBYRDEV commented Nov 8, 2022

Error messages could be fixed by #64388.

The rest of the problem can be solved by adding the environment and sun.
0.mp4

Ahhh derp! I assumed the default world env would pass through but that's my bad. Obviously the error messages are still a problem but this unblocks me.

@eh-jogos
Copy link

Error message still happening in 4.0rc2, was going to report this today but just found this older issue.

@clayjohn clayjohn modified the milestones: 4.0, 4.x Feb 23, 2023
@Gegbee
Copy link

Gegbee commented Mar 7, 2023

Can confirm that this error is happening in Godot 4.0 stable. Though it does not interfere in in editor play mode, exporting the project does not work because the viewports do not show up.

@akien-mga akien-mga modified the milestones: 4.x, 4.1 Apr 19, 2023
@Rindbee
Copy link
Contributor

Rindbee commented May 8, 2023

The error message was fixed by #75751.

@clayjohn
Copy link
Member

Can anyone reproduce this in 4.1 beta 1?

@clayjohn clayjohn modified the milestones: 4.1, 4.x Jun 13, 2023
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

7 participants