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

Viewport setsize errors on simple project with Camera2D and MeshInstance3D #91462

Open
catafest opened this issue May 2, 2024 · 2 comments
Open

Comments

@catafest
Copy link

catafest commented May 2, 2024

Tested versions

v4.3.dev5.official [89f70e9]

System information

Windows 10 Pro, NVIDIA GeForce GTX 950

Issue description

I tried to use Subviewport with Camera2D and Quadmesh I tested and I followed some issues: #40651
#54122
#50296
#55471
I got these errors :
image
Maybe this is not a real bug and is a bad practice.
No matter how you use it, there should be no size setting errors...

Steps to reproduce

See the project I added in the section: Minimal reproduction project (MRP) :

Minimal reproduction project (MRP)

SubViewport_Bug_001.zip

@Sauermann
Copy link
Contributor

Possibly a duplicate of #66247

@graphific
Copy link

I'm having the same issue on v4.3beta1.
fix for me as mentioned in #66247

func update_material():
	var shader_material = ShaderMaterial.new()
	shader_material.shader = load("res://objects/video.gdshader")
	shader_material.set_shader_parameter("portal_texture", sub_viewport.get_texture())
	mesh_instance.material_override = shader_material

shader

shader_type spatial;
render_mode unshaded;

uniform sampler2D portal_texture;

void fragment() {
    vec4 texture_color = texture(portal_texture, UV);
    ALBEDO = texture_color.rgb;
    ALPHA = texture_color.a;
}

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

3 participants