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

Instantiating GPUParticle2D nodes with a Line2D node on screen creates graphical artifacts #69669

Closed
Lemonymous opened this issue Dec 6, 2022 · 3 comments

Comments

@Lemonymous
Copy link

Godot version

4.0.dev (30800d2)

System information

Windows 10, Forward+, NVIDIA GeForce GTX 1050 Ti (31.0.15.1694)

Issue description

Updating a Line2D node and creating/freeing GPUParticleEmitter2D nodes will cause graphical artifacts on Godot 4. The same test project built in Godot 3.5.1.stable does not create any artifacts.

Steps to reproduce

  • Create a Line2D with 2 points
  • Make one of its points follow the mouse cursor
  • Create a GPUParticle2D with a script freeing it when a Timer times out
  • Instance GPUParticle2D nodes at the cursor location when holding down the mouse button
  • Artifacts will appear when creating particles and moving the line around

Minimal reproduction project

Project created in Godot 4 - this one will show artifacts
GPU Particle Bug Godot 4.zip

The same project without created in Godot 3 - showing no artifacts
GPU Particle Bug Godot 3.zip

@Calinou
Copy link
Member

Calinou commented Dec 6, 2022

Related to #56691.

@Lemonymous
Copy link
Author

On v4.0.beta.custom_build [291add3] after merged PR #70418,
the graphical artifacts produced in the minimal reproduction project in this Issue seems to no longer be an issue.

However, this code in the minimal reproduction project produces a whole wall of errors now, which it did not before. I have not investigated further.

extends Node2D

const EFFECT = preload("res://gpu_particles_2d.tscn")

func _input(event):
	if event.is_action_pressed("create_effect"):
		var effect = EFFECT.instantiate()
		add_child(effect)
		effect.position = get_global_mouse_position()

Errors:
errors

@akien-mga
Copy link
Member

Fixed by #70418, errors are tracked in #70431.

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

No branches or pull requests

3 participants