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

Dissolve2D demo crashes on launch #44

Open
1 of 2 tasks
johnnygossdev opened this issue Aug 12, 2022 · 0 comments
Open
1 of 2 tasks

Dissolve2D demo crashes on launch #44

johnnygossdev opened this issue Aug 12, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@johnnygossdev
Copy link
Contributor

johnnygossdev commented Aug 12, 2022

I'm submitting a...

  • Bug report.
  • Feature request.

Bug report

What is the current behavior?
The Dissolve2D shader demo crashes on launch due to an "Invalid get index" error in Particles2D.gd.

# ...
func _physics_process(_delta: float) -> void:
	var data := emission_mask.get_data().data
	var width: int = data.width
	var height: int = data.height
	var raw: PoolByteArray = data.data

	var positions := PoolVector2Array()

	for x in width * height:
		for y in height:
			var idx: int = (y * width + x) * 4
			var byte: int = raw[idx] # <--- This line causes the error
			if byte > 128:
				positions.append(Vector2(x, y) * 8 - position)
	# ...	

Steps to reproduce

  • Run the Dissolve2D shader scene
@johnnygossdev johnnygossdev added the bug Something isn't working label Aug 12, 2022
@SamTheBlow SamTheBlow mentioned this issue Jun 15, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant